fix #2054 Completer ignores better match if autoinsert is enabled

This commit is contained in:
nightwing 2014-09-07 14:46:20 +04:00
commit e8f7419131

View file

@ -297,7 +297,7 @@ var Autocomplete = function() {
return detachIfFinished();
// Autoinsert if one result
if (this.autoInsert && filtered.length == 1)
if (this.autoInsert && filtered.length == 1 && results.finished)
return this.insertMatch(filtered[0]);
this.openPopup(this.editor, prefix, keepPopupPosition);