mirror of
https://github.com/AdaCore/ace.git
synced 2026-02-12 13:03:02 -08:00
Update regex and condition check according to suggestion
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user