diff options
| author | Jez Ng | 2012-10-20 19:32:17 -0400 |
|---|---|---|
| committer | Jez Ng | 2012-10-20 19:32:17 -0400 |
| commit | 1e98c4c8d6636fcbae99bd37dc305b7210c2590e (patch) | |
| tree | 4fe114645a90a3f84abc5fc35dab880233d552b9 | |
| parent | 648d9d118a963349372d381ddd37af647d850395 (diff) | |
| download | vimium-1e98c4c8d6636fcbae99bd37dc305b7210c2590e.tar.bz2 | |
Ensure Vomnibar selection is always within bounds.
Closes #670.
| -rw-r--r-- | content_scripts/vomnibar.coffee | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/content_scripts/vomnibar.coffee b/content_scripts/vomnibar.coffee index ec444e9e..32d5dbac 100644 --- a/content_scripts/vomnibar.coffee +++ b/content_scripts/vomnibar.coffee @@ -24,7 +24,7 @@ Vomnibar = @vomnibarUI.update() activate: -> @activateWithCompleter("omni", 100) - activateInNewTab: -> @activateWithCompleter("omni", 100, null, true, true) + activateInNewTab: -> @activateWithCompleter("omni", 100, null, false, true) activateTabSelection: -> @activateWithCompleter("tabs", 0, null, true) activateBookmarks: -> @activateWithCompleter("bookmarks", 0, null, true) activateBookmarksInNewTab: -> @activateWithCompleter("bookmarks", 0, null, true, true) @@ -68,8 +68,7 @@ class VomnibarUI @update(true) updateSelection: -> - if (@completions.length > 0) - @selection = Math.min(@selection, @completions.length - 1) + @selection = Math.min(@selection, @completions.length - 1) for i in [0...@completionList.children.length] @completionList.children[i].className = (if i == @selection then "vomnibarSelected" else "") |
