aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/completion_engines.coffee
diff options
context:
space:
mode:
authorStephen Blott2015-05-07 09:25:15 +0100
committerStephen Blott2015-05-07 09:25:15 +0100
commit430bdc8bdf7c109a3007104fc06abeeed1891529 (patch)
tree8a7d83fe05c735cb5829e0da26adf40e0703ed79 /background_scripts/completion_engines.coffee
parentc7fb211f0d1a6504bd0cbb94395f9437f858f2c0 (diff)
downloadvimium-430bdc8bdf7c109a3007104fc06abeeed1891529.tar.bz2
Search completion; tweak domain completer.
Diffstat (limited to 'background_scripts/completion_engines.coffee')
-rw-r--r--background_scripts/completion_engines.coffee7
1 files changed, 4 insertions, 3 deletions
diff --git a/background_scripts/completion_engines.coffee b/background_scripts/completion_engines.coffee
index 8a880930..3e762e32 100644
--- a/background_scripts/completion_engines.coffee
+++ b/background_scripts/completion_engines.coffee
@@ -136,7 +136,6 @@ CompletionEngines =
xhr.onreadystatechange = ->
if xhr.readyState == 4
- console.log xhr.getAllResponseHeaders()
callback(if xhr.status == 200 then xhr else null)
# Look up the completion engine for this searchUrl. Because of DummyCompletionEngine, above, we know there
@@ -214,6 +213,7 @@ CompletionEngines =
if handler != @mostRecentHandler # Bail if another completion has begun, or the user is typing.
console.log "bail", completionCacheKey if @debug
return callback []
+ @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.
@inTransit ?= {}
@@ -228,8 +228,9 @@ CompletionEngines =
callback suggestions for callback in queue
cancel: ->
- console.log "cancel (user is typing)" if @debug and @mostRecentHandler?
- @mostRecentHandler = null
+ if @mostRecentHandler?
+ @mostRecentHandler = null
+ console.log "cancel (user is typing)" if @debug
root = exports ? window
root.CompletionEngines = CompletionEngines