From 27f77603aee35fcdc6edcd0697ec0f15c41a6a82 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Wed, 6 Dec 2023 09:25:29 +0100 Subject: [PATCH] changed: grep defaults selection --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 7599552..7d1b6a2 100644 --- a/main.js +++ b/main.js @@ -1691,7 +1691,7 @@ function showgrepresult(needle, grepresult) function showgrep() { - var text = prompt("Search:"); + var text = prompt("Search:", md.selectionEnd > md.selectionStart ? md.value.substr(md.selectionStart, md.selectionEnd - md.selectionStart).trim() : ""); if (text) { showgrepresult(text, grep(text));