aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vimium_frontend.coffee
diff options
context:
space:
mode:
authormrmr19932015-06-03 03:34:34 +0100
committermrmr19932015-06-10 17:26:53 +0100
commit24c53c33ea8b4b603db91bc68fd3b7e50d7b5615 (patch)
tree5eb10e835ac21022e6de9366bb86f973c759fb20 /content_scripts/vimium_frontend.coffee
parent850533b89c71a0320b610ad2d26161067a5ace3b (diff)
downloadvimium-24c53c33ea8b4b603db91bc68fd3b7e50d7b5615.tar.bz2
Integrate performFindInPlace into FindMode as findInPlace
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
-rw-r--r--content_scripts/vimium_frontend.coffee14
1 files changed, 7 insertions, 7 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 633e4122..9e4d2ab3 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -688,7 +688,7 @@ window.handleEnterForFindMode = ->
class FindMode extends Mode
constructor: (@options = {}) ->
- # Save the selection, so performFindInPlace can restore it.
+ # Save the selection, so findInPlace can restore it.
@initialRange = getCurrentRange()
window.findModeQuery = rawQuery: ""
if @options.returnToViewport
@@ -711,12 +711,12 @@ class FindMode extends Mode
selection.removeAllRanges()
selection.addRange range
-window.performFindInPlace = ->
- # Restore the selection. That way, we're always searching forward from the same place, so we find the right
- # match as the user adds matching characters, or removes previously-matched characters. See #1434.
- findMode.restoreSelection()
- query = if findModeQuery.isRegex then getNextQueryFromRegexMatches(0) else findModeQuery.parsedQuery
- window.findModeQueryHasResults = executeFind(query, { caseSensitive: !findModeQuery.ignoreCase })
+ findInPlace: ->
+ # Restore the selection. That way, we're always searching forward from the same place, so we find the right
+ # match as the user adds matching characters, or removes previously-matched characters. See #1434.
+ @restoreSelection()
+ query = if findModeQuery.isRegex then getNextQueryFromRegexMatches(0) else findModeQuery.parsedQuery
+ window.findModeQueryHasResults = executeFind(query, { caseSensitive: !findModeQuery.ignoreCase })
# :options is an optional dict. valid parameters are 'caseSensitive' and 'backwards'.
executeFind = (query, options) ->