aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vomnibar.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'content_scripts/vomnibar.coffee')
-rw-r--r--content_scripts/vomnibar.coffee2
1 files changed, 1 insertions, 1 deletions
diff --git a/content_scripts/vomnibar.coffee b/content_scripts/vomnibar.coffee
index 724f4874..31e58f15 100644
--- a/content_scripts/vomnibar.coffee
+++ b/content_scripts/vomnibar.coffee
@@ -68,7 +68,6 @@ class VomnibarUI
@update(true)
updateSelection: ->
- @selection = Math.min(@selection, @completions.length - 1)
for i in [0...@completionList.children.length]
@completionList.children[i].className = (if i == @selection then "vomnibarSelected" else "")
@@ -139,6 +138,7 @@ class VomnibarUI
# update completion list with the new data
@completionList.innerHTML = completions.map((completion) -> "<li>#{completion.html}</li>").join("")
@completionList.style.display = if completions.length > 0 then "block" else "none"
+ @selection = Math.min(Math.max(@initialSelectionValue, @selection), @completions.length - 1)
@updateSelection()
update: (updateSynchronously, callback) ->