forked from Wavyzz/dolibarr
NEW Upgrade ace to 1.4.8 - Upgrade select2 to 4.0.13
This commit is contained in:
@@ -747,15 +747,16 @@ var TabstopManager = function(editor) {
|
||||
|
||||
this.onChange = function(delta) {
|
||||
var isRemove = delta.action[0] == "r";
|
||||
var parents = this.selectedTabstop && this.selectedTabstop.parents || {};
|
||||
var selectedTabstop = this.selectedTabstop || {};
|
||||
var parents = selectedTabstop.parents || {};
|
||||
var tabstops = (this.tabstops || []).slice();
|
||||
for (var i = 0; i < tabstops.length; i++) {
|
||||
var ts = tabstops[i];
|
||||
var active = ts == this.selectedTabstop || parents[ts.index];
|
||||
var active = ts == selectedTabstop || parents[ts.index];
|
||||
ts.rangeList.$bias = active ? 0 : 1;
|
||||
|
||||
if (delta.action == "remove" && ts !== this.selectedTabstop) {
|
||||
var parentActive = ts.parents && ts.parents[this.selectedTabstop.index];
|
||||
if (delta.action == "remove" && ts !== selectedTabstop) {
|
||||
var parentActive = ts.parents && ts.parents[selectedTabstop.index];
|
||||
var startIndex = ts.rangeList.pointIndex(delta.start, parentActive);
|
||||
startIndex = startIndex < 0 ? -startIndex - 1 : startIndex + 1;
|
||||
var endIndex = ts.rangeList.pointIndex(delta.end, parentActive);
|
||||
@@ -868,8 +869,6 @@ var TabstopManager = function(editor) {
|
||||
var ranges = this.ranges;
|
||||
tabstops.forEach(function(ts, index) {
|
||||
var dest = this.$openTabstops[index] || ts;
|
||||
ts.rangeList = new RangeList();
|
||||
ts.rangeList.$bias = 0;
|
||||
|
||||
for (var i = 0; i < ts.length; i++) {
|
||||
var p = ts[i];
|
||||
@@ -879,7 +878,6 @@ var TabstopManager = function(editor) {
|
||||
range.original = p;
|
||||
range.tabstop = dest;
|
||||
ranges.push(range);
|
||||
ts.rangeList.ranges.push(range);
|
||||
if (dest != ts)
|
||||
dest.unshift(range);
|
||||
else
|
||||
@@ -897,6 +895,9 @@ var TabstopManager = function(editor) {
|
||||
this.$openTabstops[index] = dest;
|
||||
}
|
||||
this.addTabstopMarkers(dest);
|
||||
dest.rangeList = dest.rangeList || new RangeList();
|
||||
dest.rangeList.$bias = 0;
|
||||
dest.rangeList.addList(dest);
|
||||
}, this);
|
||||
|
||||
if (arg.length > 2) {
|
||||
@@ -939,21 +940,18 @@ var TabstopManager = function(editor) {
|
||||
|
||||
this.keyboardHandler = new HashHandler();
|
||||
this.keyboardHandler.bindKeys({
|
||||
"Tab": function(ed) {
|
||||
if (exports.snippetManager && exports.snippetManager.expandWithTab(ed)) {
|
||||
"Tab": function(editor) {
|
||||
if (exports.snippetManager && exports.snippetManager.expandWithTab(editor))
|
||||
return;
|
||||
}
|
||||
|
||||
ed.tabstopManager.tabNext(1);
|
||||
editor.tabstopManager.tabNext(1);
|
||||
editor.renderer.scrollCursorIntoView();
|
||||
},
|
||||
"Shift-Tab": function(ed) {
|
||||
ed.tabstopManager.tabNext(-1);
|
||||
"Shift-Tab": function(editor) {
|
||||
editor.tabstopManager.tabNext(-1);
|
||||
editor.renderer.scrollCursorIntoView();
|
||||
},
|
||||
"Esc": function(ed) {
|
||||
ed.tabstopManager.detach();
|
||||
},
|
||||
"Return": function(ed) {
|
||||
return false;
|
||||
"Esc": function(editor) {
|
||||
editor.tabstopManager.detach();
|
||||
}
|
||||
});
|
||||
}).call(TabstopManager.prototype);
|
||||
@@ -1355,7 +1353,7 @@ exports.parForEach = function(array, fn, callback) {
|
||||
}
|
||||
};
|
||||
|
||||
var ID_REGEX = /[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;
|
||||
var ID_REGEX = /[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;
|
||||
|
||||
exports.retrievePrecedingIdentifier = function(text, pos, regex) {
|
||||
regex = regex || ID_REGEX;
|
||||
|
||||
Reference in New Issue
Block a user