diff options
| author | Stephen Blott | 2015-05-10 07:25:20 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-05-10 07:25:20 +0100 |
| commit | 8d51ccbb01fe2a4e7b548cc14617a05048a8d68c (patch) | |
| tree | 68e4d407c4e758b03dde7238e9ef837551ea84ee | |
| parent | 0fa0f17190459bb37bfe8752f98cd8b37e689437 (diff) | |
| download | vimium-8d51ccbb01fe2a4e7b548cc14617a05048a8d68c.tar.bz2 | |
Search completion; more minor tweaks.
| -rw-r--r-- | pages/vomnibar.coffee | 11 |
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 |
