aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2015-05-04 09:54:36 +0100
committerStephen Blott2015-05-04 09:54:36 +0100
commit85aa77ce1daec7bd1452cd7813a0d5d408729408 (patch)
treec3dad7fb9cfd831a73738ddecf3f463430491efb
parent136b132c81ae4f7a3b296109427fd757ca05dacf (diff)
downloadvimium-85aa77ce1daec7bd1452cd7813a0d5d408729408.tar.bz2
Search completion; prevent vomnibar flicker.
-rw-r--r--background_scripts/completion.coffee6
1 files changed, 5 insertions, 1 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee
index 37e9ea6b..a75cf6b5 100644
--- a/background_scripts/completion.coffee
+++ b/background_scripts/completion.coffee
@@ -469,7 +469,11 @@ class MultiCompleter
continuation = cont if cont?
if @completers.length <= ++completersFinished
shouldRunContinuation = continuation? and not @mostRecentQuery
- onComplete @prepareSuggestions(queryTerms, suggestions), keepAlive: shouldRunContinuation
+ # We don't post results immediately if there are none, and we're going to run a continuation
+ # (ie. a SearchEngineCompleter). This prevents hiding the vomnibar briefly before showing it
+ # again, which looks ugly.
+ unless shouldRunContinuation and suggestions.length == 0
+ onComplete @prepareSuggestions(queryTerms, suggestions), keepAlive: shouldRunContinuation
# Allow subsequent queries to begin.
@filterInProgress = false
if shouldRunContinuation