From fb3e4c2706fed44f76ff24395a488f2601865e54 Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Wed, 3 Jun 2015 04:15:24 +0100 Subject: Inline showFindModeHUDForQuery at its sole callsite --- content_scripts/hud.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'content_scripts/hud.coffee') 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). -- cgit v1.2.3