diff options
| author | Stephen Blott | 2015-05-17 11:40:34 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-05-17 11:40:34 +0100 | 
| commit | a730a3b4639a8eb5f909c7c4acda8e4d6e1ba0b9 (patch) | |
| tree | c20fca0949eb0b27bc1de6d52911ed8ad93a4959 /background_scripts/completion.coffee | |
| parent | 222d3dd6491bca8f152382fb84e2d43c499b8951 (diff) | |
| download | vimium-a730a3b4639a8eb5f909c7c4acda8e4d6e1ba0b9.tar.bz2 | |
TabToOpen: more tidy up pre-PR (additional comments).
Diffstat (limited to 'background_scripts/completion.coffee')
| -rw-r--r-- | background_scripts/completion.coffee | 15 | 
1 files changed, 10 insertions, 5 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index cc1ada5b..8a7d0a47 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -22,15 +22,18 @@ class Suggestion      @title = ""      # Extra data which will be available to the relevancy function.      @relevancyData = null -    # If @autoSelect is truthy, then this suggestion is automatically pre-selected in the vomnibar.  There may -    # be at most one such suggestion. +    # If @autoSelect is truthy, then this suggestion is automatically pre-selected in the vomnibar.  This only +    # affects the suggestion in slot 0 in the vomnibar.      @autoSelect = false -    # If @highlightTerms is true, then we highlight matched terms in the title and URL. +    # If @highlightTerms is true, then we highlight matched terms in the title and URL.  Otherwise we don't.      @highlightTerms = true -    # If @insertText is a string, then the indicated text is inserted into the vomnibar input when the -    # suggestion is selected. +    # @insertText is text to insert into the vomnibar input when the suggestion is selected.      @insertText = null +    # Other options set by individual completers include: +    # - tabId (TabCompleter) +    # - isSearchSuggestion, customSearchMode (SearchEngineCompleter) +      extend this, @options    computeRelevancy: -> @@ -539,6 +542,8 @@ class SearchEngineCompleter        unless suggestion.isSearchSuggestion or suggestion.insertText          for engine in engines            if suggestion.insertText = Utils.extractQuery engine.searchUrl, suggestion.url +            # suggestion.customSearchMode informs the vomnibar that, if the users edits the text from this +            # suggestion, then custom search-engine mode should be activated.              suggestion.customSearchMode = engine.keyword              suggestion.title = suggestion.insertText              console.log suggestion.insertText, engine unless engine.description  | 
