From 176cac1249e1ee063ef0cadf05d7b090650686fb Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Wed, 13 May 2015 19:34:34 +0100 Subject: Search completion; ensure wighting fact stays within bounds. --- background_scripts/completion.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'background_scripts') diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 8f99b90e..ebf56dde 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -421,7 +421,7 @@ class SearchEngineCompleter return onComplete [] unless custom or 0 < queryTerms.length - factor = Settings.get "omniSearchWeight" + factor = Math.max 0, Math.min 1, Settings.get "omniSearchWeight" haveCompletionEngine = (0.0 < factor or custom) and CompletionSearch.haveCompletionEngine searchUrl # Relevancy: -- cgit v1.2.3