From 1e98c4c8d6636fcbae99bd37dc305b7210c2590e Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Sat, 20 Oct 2012 19:32:17 -0400 Subject: Ensure Vomnibar selection is always within bounds. Closes #670. --- content_scripts/vomnibar.coffee | 5 ++--- 1 file 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 "") -- cgit v1.2.3