diff options
Diffstat (limited to 'content_scripts')
| -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). |
