diff options
| author | Stephen Blott | 2015-01-25 09:37:29 +0000 |
|---|---|---|
| committer | Stephen Blott | 2015-01-25 10:36:52 +0000 |
| commit | 05351d4650ace35574bf4f9c55cced65950252f5 (patch) | |
| tree | 4054f01f07b2c581723a8528e15bfa947c080b26 /content_scripts/vimium_frontend.coffee | |
| parent | 9c4603680284a4e00f11b097aebc65c6f6c0af07 (diff) | |
| download | vimium-05351d4650ace35574bf4f9c55cced65950252f5.tar.bz2 | |
Visual/edit modes: find (experimental).
The UX around find in visual mode can be a bit weird. It may be better
to remove it.
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 }) |
