| Index: third_party/WebKit/Source/devtools/front_end/text_editor/TextEditorAutocompleteController.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/text_editor/TextEditorAutocompleteController.js b/third_party/WebKit/Source/devtools/front_end/text_editor/TextEditorAutocompleteController.js
|
| index 080f19026187604515529810444725c7929d97cb..a0516cc7f112be6588e2e4e6170857061f87361a 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/text_editor/TextEditorAutocompleteController.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/text_editor/TextEditorAutocompleteController.js
|
| @@ -109,15 +109,16 @@ WebInspector.TextEditorAutocompleteController = class {
|
| /**
|
| * @param {!WebInspector.TextRange} queryRange
|
| * @param {!WebInspector.TextRange} substituteRange
|
| + * @param {boolean=} force
|
| * @return {!Promise.<!WebInspector.SuggestBox.Suggestions>}
|
| */
|
| - _wordsWithQuery(queryRange, substituteRange) {
|
| + _wordsWithQuery(queryRange, substituteRange, force) {
|
| var external =
|
| - this._config.suggestionsCallback ? this._config.suggestionsCallback(queryRange, substituteRange) : null;
|
| + this._config.suggestionsCallback ? this._config.suggestionsCallback(queryRange, substituteRange, force) : null;
|
| if (external)
|
| return external;
|
|
|
| - if (!this._dictionary || queryRange.startColumn === queryRange.endColumn)
|
| + if (!this._dictionary || (!force && queryRange.isEmpty()))
|
| return Promise.resolve([]);
|
|
|
| var completions = this._dictionary.wordsWithPrefix(this._textEditor.text(queryRange));
|
| @@ -209,7 +210,10 @@ WebInspector.TextEditorAutocompleteController = class {
|
| return true;
|
| }
|
|
|
| - autocomplete() {
|
| + /**
|
| + * @param {boolean=} force
|
| + */
|
| + autocomplete(force) {
|
| this._initializeIfNeeded();
|
| if (this._codeMirror.somethingSelected()) {
|
| this.clearAutocomplete();
|
| @@ -230,7 +234,7 @@ WebInspector.TextEditorAutocompleteController = class {
|
| if (this._suggestBox)
|
| hadSuggestBox = true;
|
|
|
| - this._wordsWithQuery(queryRange, substituteRange).then(wordsAcquired.bind(this));
|
| + this._wordsWithQuery(queryRange, substituteRange, force).then(wordsAcquired.bind(this));
|
|
|
| /**
|
| * @param {!WebInspector.SuggestBox.Suggestions} wordsWithQuery
|
|
|