Don't autoInsert with auto magic completer
This caused completions to be inserted without ever being shown, if they were the only completion for the prefix entered.
This commit is contained in:
parent
af1aab40f5
commit
c4012ebd46
1 changed files with 12 additions and 1 deletions
|
|
@ -145,7 +145,18 @@ var onChangeAutocomplete = function(e, editor) {
|
|||
|
||||
// Only autocomplete if there's a prefix that can be matched
|
||||
if(prefix !== '' && !(hasCompleter)) {
|
||||
Autocomplete.startCommand.exec(editor);
|
||||
if (!editor.completer) {
|
||||
// Create new autocompleter
|
||||
editor.completer = new Autocomplete();
|
||||
|
||||
// Disable autoInsert
|
||||
editor.completer.autoInsert = false;
|
||||
}
|
||||
|
||||
editor.completer.showPopup(editor);
|
||||
// needed for firefox on mac
|
||||
editor.completer.cancelContextMenu();
|
||||
|
||||
} else if(prefix === '' && hasCompleter) {
|
||||
// When the prefix is empty
|
||||
// close the autocomplete dialog
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue