aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2015-05-10 07:25:20 +0100
committerStephen Blott2015-05-10 07:25:20 +0100
commit8d51ccbb01fe2a4e7b548cc14617a05048a8d68c (patch)
tree68e4d407c4e758b03dde7238e9ef837551ea84ee
parent0fa0f17190459bb37bfe8752f98cd8b37e689437 (diff)
downloadvimium-8d51ccbb01fe2a4e7b548cc14617a05048a8d68c.tar.bz2
Search completion; more minor tweaks.
-rw-r--r--pages/vomnibar.coffee11
1 files changed, 6 insertions, 5 deletions
diff --git a/pages/vomnibar.coffee b/pages/vomnibar.coffee
index 4dd05cd4..2077c559 100644
--- a/pages/vomnibar.coffee
+++ b/pages/vomnibar.coffee
@@ -218,16 +218,17 @@ class VomnibarUI
@updateSelection()
else if (action == "enter")
if @selection == -1
+ # The user has not selected a suggestion.
query = @input.value.trim()
# <Enter> on an empty vomnibar is a no-op.
return unless 0 < query.length
if @suppressedLeadingKeyword?
- # This is a custom search engine completion. Because of the way we add the text common to all
- # completions to the input (highlighted), the text in the input might not correspond to any of the
- # completions. So we fire the query off to the background page and use the completion at the top of
- # the list (which will be the right one).
+ # This is a custom search engine completion. Because of the way we add and highlight the text
+ # common to all completions in the input (highlightCommonMatches), the text in the input might not
+ # correspond to any of the completions. So we fire the query off to the background page and use the
+ # completion at the top of the list (which will be the right one).
@update true, =>
- if @completions[0]?
+ if @completions[0]
completion = @completions[0]
@hide -> completion.performAction openInNewTab
else