diff options
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 5fe40e5a..65fd0b97 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -864,6 +864,12 @@ getNextQueryFromRegexMatches = (stepSize) -> findModeQuery.regexMatches[findModeQuery.activeRegexIndex] +window.getFindModeQuery = -> + if findModeQuery.isRegex + getNextQueryFromRegexMatches(if backwards then -1 else 1) + else + findModeQuery.parsedQuery + findAndFocus = (backwards) -> # check if the query has been changed by a script in another frame mostRecentQuery = settings.get("findModeRawQuery") || "" @@ -871,11 +877,7 @@ findAndFocus = (backwards) -> findModeQuery.rawQuery = mostRecentQuery updateFindModeQuery() - query = - if findModeQuery.isRegex - getNextQueryFromRegexMatches(if backwards then -1 else 1) - else - findModeQuery.parsedQuery + query = getFindModeQuery() findModeQueryHasResults = executeFind(query, { backwards: backwards, caseSensitive: !findModeQuery.ignoreCase }) |
