aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/completion_engines.coffee
diff options
context:
space:
mode:
authorStephen Blott2015-05-08 09:03:56 +0100
committerStephen Blott2015-05-08 09:03:56 +0100
commit2dfcd17ea485484cedf636a94b9c89c527e2e0b7 (patch)
tree9e768056ffa70a79ca8ff9c2d1d5177755ed0652 /background_scripts/completion_engines.coffee
parent898c21808c709a1a551fa15bb82f6a3bb4810aae (diff)
downloadvimium-2dfcd17ea485484cedf636a94b9c89c527e2e0b7.tar.bz2
Search completion; add front end cache.
Diffstat (limited to 'background_scripts/completion_engines.coffee')
-rw-r--r--background_scripts/completion_engines.coffee8
1 files changed, 6 insertions, 2 deletions
diff --git a/background_scripts/completion_engines.coffee b/background_scripts/completion_engines.coffee
index 19a18ecd..52db90d0 100644
--- a/background_scripts/completion_engines.coffee
+++ b/background_scripts/completion_engines.coffee
@@ -209,9 +209,13 @@ CompletionEngines =
# We pause in case the user is still typing.
Utils.setTimeout @delay, handler = @mostRecentHandler = =>
- if handler != @mostRecentHandler # Bail if another completion has begun, or the user is typing.
+ if handler != @mostRecentHandler
+ # Bail! Another completion has begun, or the user is typing.
+ # NOTE: We do *not* call the callback (because we are not providing results, and we don't want allow
+ # any higher-level component to cache the results -- specifically, the vomnibar itself, via
+ # callerMayCacheResults).
console.log "bail", completionCacheKey if @debug
- return callback []
+ return
@mostRecentHandler = null
# Don't allow duplicate identical active requests. This can happen, for example, when the user enters or
# removes a space, or when they enter a character and immediately delete it.