From 7a5ace59bdc70b9fdbe9427e86319f275116925f Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 1 Feb 2015 15:56:13 +0000 Subject: Do not show match count if there is no query. --- content_scripts/vimium_frontend.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'content_scripts') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index f9a73f3e..b6728ce9 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -1014,11 +1014,13 @@ window.goNext = -> findAndFollowRel("next") || findAndFollowLink(nextStrings) showFindModeHUDForQuery = -> - if (findModeQueryHasResults || findModeQuery.parsedQuery.length == 0) + if findModeQuery.rawQuery and (findModeQueryHasResults || findModeQuery.parsedQuery.length == 0) plural = if findModeQuery.matchCount == 1 then "" else "es" HUD.show("/" + findModeQuery.rawQuery + " (" + findModeQuery.matchCount + " Match#{plural})") - else + else if findModeQuery.rawQuery HUD.show("/" + findModeQuery.rawQuery + " (No Matches)") + else + HUD.show("/") getCurrentRange = -> selection = getSelection() -- cgit v1.2.3