From b71e5c12c4e6f1f8fbb066cdb5243f4e69243137 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Wed, 15 Nov 2023 22:08:52 +0100 Subject: [PATCH] fix grep result title --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 73ca568..bf184b0 100644 --- a/main.js +++ b/main.js @@ -1656,9 +1656,9 @@ function grep(needle) return result; } -function showgrepresult(grepresult) +function showgrepresult(needle, grepresult) { - var grepcontent = ["# Search results: \"" + filter.value + "\""]; + var grepcontent = ["# Search results: \"" + needle + "\""]; for (var file in grepresult) { grepcontent.push("[[" + file + "]]"); @@ -1691,7 +1691,7 @@ function showgrep() var text = prompt("Search:"); if (text) { - showgrepresult(grep(text)); + showgrepresult(text, grep(text)); } }