diff options
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/completion.coffee | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index c1f76b81..f800c818 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -395,14 +395,16 @@ class SearchEngineCompleter # Suppress the "w" from "w query terms" in the vomnibar input. suppressLeadingKeyword: true - # Exclude results from other completers if this is a custom search engine and we have a completer. + haveCompletionEngine = CompletionEngines.haveCompletionEngine searchUrl + # If this is a custom search engine and we have a completer, then exclude results from other completers. filter = - if custom and CompletionEngines.haveCompletionEngine searchUrl + if custom and haveCompletionEngine (suggestion) -> suggestion.type == description else null - if queryTerms.length == 0 + # Post suggestions and bail if there is no prospect of adding further suggestions. + if queryTerms.length == 0 or not haveCompletionEngine return onComplete suggestions, { filter } onComplete suggestions, |
