diff options
| author | mrmr1993 | 2015-06-03 04:19:55 +0100 | 
|---|---|---|
| committer | mrmr1993 | 2015-06-10 17:26:53 +0100 | 
| commit | fca9fc1e9da4173370202d507493c92e2ddf97eb (patch) | |
| tree | 76b43c55b52700243c8bec156ed82588842283d9 /content_scripts/hud.coffee | |
| parent | fb3e4c2706fed44f76ff24395a488f2601865e54 (diff) | |
| download | vimium-fca9fc1e9da4173370202d507493c92e2ddf97eb.tar.bz2 | |
Inline HUD.updateMatchesCount at its sole callsite
Diffstat (limited to 'content_scripts/hud.coffee')
| -rw-r--r-- | content_scripts/hud.coffee | 8 | 
1 files changed, 3 insertions, 5 deletions
diff --git a/content_scripts/hud.coffee b/content_scripts/hud.coffee index 8d40a0c8..f114c000 100644 --- a/content_scripts/hud.coffee +++ b/content_scripts/hud.coffee @@ -31,18 +31,16 @@ HUD =      @hudUI.show {name: "showFindMode", text}      @tween.fade 1.0, 150 -  updateMatchesCount: (matchCount, showMatchText = true) -> -    @hudUI.postMessage {name: "updateMatchesCount", matchCount, showMatchText} -    search: (data) ->      window.scrollTo findMode.scrollX, findMode.scrollY if findMode.options.returnToViewport      findModeQuery.rawQuery = data.query      updateFindModeQuery()      findMode.findInPlace() +    # Show the number of matches in the HUD UI.      matchCount = if findModeQuery.parsedQuery.length > 0 then findModeQuery.matchCount else 0 -    showCount = findModeQuery.rawQuery.length > 0 -    HUD.updateMatchesCount matchCount, showCount +    showMatchText = findModeQuery.rawQuery.length > 0 +    @hudUI.postMessage {name: "updateMatchesCount", matchCount, showMatchText}    # Hide the HUD.    # If :immediate is falsy, then the HUD is faded out smoothly (otherwise it is hidden immediately).  | 
