Merge remote-tracking branch 'remotes/pull/1587'
This commit is contained in:
commit
94bea36cf1
1 changed files with 6 additions and 4 deletions
|
|
@ -146,14 +146,16 @@ var Autocomplete = function() {
|
||||||
data.completer.insertMatch(this.editor);
|
data.completer.insertMatch(this.editor);
|
||||||
} else {
|
} else {
|
||||||
if (this.completions.filterText) {
|
if (this.completions.filterText) {
|
||||||
var range = this.editor.selection.getRange();
|
var ranges = this.editor.selection.getAllRanges();
|
||||||
range.start.column -= this.completions.filterText.length;
|
for (var i = 0, range; range = ranges[i]; i++) {
|
||||||
this.editor.session.remove(range);
|
range.start.column -= this.completions.filterText.length;
|
||||||
|
this.editor.session.remove(range);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (data.snippet)
|
if (data.snippet)
|
||||||
snippetManager.insertSnippet(this.editor, data.snippet);
|
snippetManager.insertSnippet(this.editor, data.snippet);
|
||||||
else
|
else
|
||||||
this.editor.insert(data.value || data);
|
this.editor.execCommand("insertstring", data.value || data);
|
||||||
}
|
}
|
||||||
this.detach();
|
this.detach();
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue