fix autocomplete regression from 80187560

This commit is contained in:
nightwing 2014-05-14 16:38:50 +04:00
commit 2327d155b4
2 changed files with 2 additions and 5 deletions

View file

@ -45,7 +45,7 @@ exports.parForEach = function(array, fn, callback) {
} }
}; };
var ID_REGEX = /[a-zA-Z_0-9\$-\u007F-\uFFFF]/; var ID_REGEX = /[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;
exports.retrievePrecedingIdentifier = function(text, pos, regex) { exports.retrievePrecedingIdentifier = function(text, pos, regex) {
regex = regex || ID_REGEX; regex = regex || ID_REGEX;

View file

@ -177,17 +177,14 @@ require("../config").defineOptions(Editor.prototype, "editor", {
value: false value: false
}, },
/** /**
* Enable live autocomplete. If the value is an array, it is assumed to be an array of completer * Enable live autocomplete. If the value is an array, it is assumed to be an array of completers
* and will use them instead of the default completers. * and will use them instead of the default completers.
* NOTE: Should this be renamed to enableLiveAutocompletion to match enableBasicAutocompletion?
*/ */
enableLiveAutocompletion: { enableLiveAutocompletion: {
set: function(val) { set: function(val) {
if (val) { if (val) {
this.completers = Array.isArray(val)? val: completers; this.completers = Array.isArray(val)? val: completers;
// On each change automatically trigger the autocomplete // On each change automatically trigger the autocomplete
this.completers = completers;
this.commands.on('afterExec', doLiveAutocomplete); this.commands.on('afterExec', doLiveAutocomplete);
} else { } else {
this.commands.removeListener('afterExec', doLiveAutocomplete); this.commands.removeListener('afterExec', doLiveAutocomplete);