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);
|
||||
} else {
|
||||
if (this.completions.filterText) {
|
||||
var range = this.editor.selection.getRange();
|
||||
range.start.column -= this.completions.filterText.length;
|
||||
this.editor.session.remove(range);
|
||||
var ranges = this.editor.selection.getAllRanges();
|
||||
for (var i = 0, range; range = ranges[i]; i++) {
|
||||
range.start.column -= this.completions.filterText.length;
|
||||
this.editor.session.remove(range);
|
||||
}
|
||||
}
|
||||
if (data.snippet)
|
||||
snippetManager.insertSnippet(this.editor, data.snippet);
|
||||
else
|
||||
this.editor.insert(data.value || data);
|
||||
this.editor.execCommand("insertstring", data.value || data);
|
||||
}
|
||||
this.detach();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue