diff --git a/lib/ace/autocomplete/util.js b/lib/ace/autocomplete/util.js index 994219ff..341a6b92 100644 --- a/lib/ace/autocomplete/util.js +++ b/lib/ace/autocomplete/util.js @@ -45,7 +45,7 @@ exports.parForEach = function(array, fn, callback) { } }; -var ID_REGEX = /[a-zA-Z_0-9\$-]|[^\u0000-\u007F]/; +var ID_REGEX = /[a-zA-Z_0-9\$-\u007F-\uFFFF]/; exports.retrievePrecedingIdentifier = function(text, pos, regex) { regex = regex || ID_REGEX; diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js index f7c16d66..7abc2ef8 100644 --- a/lib/ace/ext/language_tools.js +++ b/lib/ace/ext/language_tools.js @@ -168,11 +168,7 @@ require("../config").defineOptions(Editor.prototype, "editor", { enableBasicAutocompletion: { set: function(val) { if (val) { - if (Array.isArray(val)) { - completers = val; - } - - this.completers = completers; + this.completers = Array.isArray(val)? val: completers; this.commands.addCommand(Autocomplete.startCommand); } else { this.commands.removeCommand(Autocomplete.startCommand); @@ -188,11 +184,7 @@ require("../config").defineOptions(Editor.prototype, "editor", { enableLiveAutocompletion: { set: function(val) { if (val) { - if (Array.isArray(val)) { - completers = val; - } - - this.completers = completers; + this.completers = Array.isArray(val)? val: completers; // On each change automatically trigger the autocomplete this.completers = completers;