This commit is contained in:
nightwing 2014-03-23 15:19:24 +04:00
commit 79f619364a
2 changed files with 4 additions and 8 deletions

View file

@ -181,11 +181,9 @@ var Autocomplete = function() {
"Esc": function(editor) { editor.completer.detach(); },
"Space": function(editor) { editor.completer.detach(); editor.insert(" ");},
"Return": function(editor) {
if (editor.completer.popup.getRow() > -1) {
editor.completer.insertMatch();
} else {
editor.insert("\n");
}
if (editor.completer.popup.getRow() == -1)
return false;
editor.completer.insertMatch();
},
"Shift-Return": function(editor) { editor.completer.insertMatch(true); },
"Tab": function(editor) { editor.completer.insertMatch(); },
@ -290,8 +288,7 @@ var Autocomplete = function() {
return doDetach();
// Wrong prefix or wrong session -> ignore
if (prefix.indexOf(results.prefix) != 0
|| _id != this.gatherCompletionsId)
if (prefix.indexOf(results.prefix) != 0 || _id != this.gatherCompletionsId)
return;
this.completions = new FilteredList(matches);

View file

@ -114,7 +114,6 @@ var Tokenizer = function(rules) {
// makes property access faster
if (!rule.onMatch)
rule.onMatch = null;
rule.__proto__ = null;
}
splitterRurles.forEach(function(rule) {