aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormrmr19932015-06-03 04:15:24 +0100
committermrmr19932015-06-10 17:26:53 +0100
commitfb3e4c2706fed44f76ff24395a488f2601865e54 (patch)
tree85f0f3a4acbdfbe73d58501c83c1b3db28b8acd5
parent24c53c33ea8b4b603db91bc68fd3b7e50d7b5615 (diff)
downloadvimium-fb3e4c2706fed44f76ff24395a488f2601865e54.tar.bz2
Inline showFindModeHUDForQuery at its sole callsite
-rw-r--r--content_scripts/hud.coffee5
-rw-r--r--content_scripts/vimium_frontend.coffee6
2 files changed, 4 insertions, 7 deletions
diff --git a/content_scripts/hud.coffee b/content_scripts/hud.coffee
index 4535ba69..8d40a0c8 100644
--- a/content_scripts/hud.coffee
+++ b/content_scripts/hud.coffee
@@ -39,7 +39,10 @@ HUD =
findModeQuery.rawQuery = data.query
updateFindModeQuery()
findMode.findInPlace()
- showFindModeHUDForQuery()
+
+ matchCount = if findModeQuery.parsedQuery.length > 0 then findModeQuery.matchCount else 0
+ showCount = findModeQuery.rawQuery.length > 0
+ HUD.updateMatchesCount matchCount, showCount
# Hide the HUD.
# If :immediate is falsy, then the HUD is faded out smoothly (otherwise it is hidden immediately).
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 9e4d2ab3..077da3fa 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -897,12 +897,6 @@ window.goNext = ->
nextStrings = nextPatterns.split(",").filter( (s) -> s.trim().length )
findAndFollowRel("next") || findAndFollowLink(nextStrings)
-window.showFindModeHUDForQuery = ->
- matchCount = if findModeQuery.parsedQuery.length > 0 then findModeQuery.matchCount else 0
- showCount = findModeQuery.rawQuery.length > 0
-
- HUD.updateMatchesCount matchCount, showCount
-
getCurrentRange = ->
selection = getSelection()
if selection.type == "None"