diff options
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 5ba6fa45..c7cff961 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -555,8 +555,11 @@ updateFindModeQuery = -> findModeQuery.regexMatches = text.match(pattern) findModeQuery.activeRegexIndex = 0 findModeQuery.matchCount = findModeQuery.regexMatches?.length + # if we are doing a basic plain string match, we still want to grep for matches of the string, so we can + # show a the number of results. We can grep on document.body.innerText, as it should be indistinguishable + # from the internal representation used by window.find. else - # escape all special characters, so RegExp just parses the string + # escape all special characters, so RegExp just parses the string 'as is'. parsedNonRegexQuery = findModeQuery.parsedQuery.replace("\\", "\\\\") .replace("^", "\\^") .replace("$", "\\$") |
