aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2015-05-27 08:13:53 +0100
committerStephen Blott2015-05-27 08:13:53 +0100
commita65d79b810cf4c165c2174ad9893db0ebcc9989f (patch)
tree7adafd31d39d9a93007e0688b97b1c0c310dfa5d
parent1e236a21373f667f8fd1cec07df4b647b2b30e1c (diff)
downloadvimium-a65d79b810cf4c165c2174ad9893db0ebcc9989f.tar.bz2
Custom-only: disable default search completion.
-rw-r--r--background_scripts/completion.coffee4
1 files changed, 3 insertions, 1 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee
index 30a7b882..dc2c9360 100644
--- a/background_scripts/completion.coffee
+++ b/background_scripts/completion.coffee
@@ -464,7 +464,7 @@ class SearchEngineCompleter
searchUrl: Settings.get "searchUrl"
description: "search"
- return onComplete [] unless custom or 0 < queryTerms.length
+ return onComplete [] unless custom
factor = Math.max 0.0, Math.min 1.0, Settings.get "omniSearchWeight"
haveCompletionEngine = (0.0 < factor or custom) and CompletionSearch.haveCompletionEngine searchUrl
@@ -514,6 +514,8 @@ class SearchEngineCompleter
highlightTerms: not haveCompletionEngine
isSearchSuggestion: true
+ return onComplete [ primarySuggestion ], { filter } if queryTerms.length == 0
+
mkSuggestion = (suggestion) =>
url = Utils.createSearchUrl suggestion, searchUrl
@previousSuggestions[url] = new Suggestion