diff options
| author | Stephen Blott | 2015-05-04 09:54:36 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-05-04 09:54:36 +0100 |
| commit | 85aa77ce1daec7bd1452cd7813a0d5d408729408 (patch) | |
| tree | c3dad7fb9cfd831a73738ddecf3f463430491efb /background_scripts/completion.coffee | |
| parent | 136b132c81ae4f7a3b296109427fd757ca05dacf (diff) | |
| download | vimium-85aa77ce1daec7bd1452cd7813a0d5d408729408.tar.bz2 | |
Search completion; prevent vomnibar flicker.
Diffstat (limited to 'background_scripts/completion.coffee')
| -rw-r--r-- | background_scripts/completion.coffee | 6 |
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 |
