Update ACE Editor to version 1.2.9

The new ACE editor introduces full support for emojis (and, thereby, UTF-16 characters with high- and low-surrogates). Hence, we can remove our custom fix.

Further, this update will allow emojis to be used in pair programming sessions.
This commit is contained in:
Sebastian Serth
2023-09-12 18:45:47 +02:00
parent 13bd68d760
commit 60656443e2
210 changed files with 66466 additions and 33266 deletions

View File

@@ -16,20 +16,26 @@ var C9SearchHighlightRules = function() {
"start" : [
{
tokenNames : ["c9searchresults.constant.numeric", "c9searchresults.text", "c9searchresults.text", "c9searchresults.keyword"],
regex : "(^\\s+[0-9]+)(:\\s)(.+)",
regex : /(^\s+[0-9]+)(:)(\d*\s?)([^\r\n]+)/,
onMatch : function(val, state, stack) {
var values = this.splitRegex.exec(val);
var types = this.tokenNames;
var tokens = [{
type: types[0],
value: values[1]
},{
}, {
type: types[1],
value: values[2]
}];
if (values[3]) {
if (values[3] == " ")
tokens[1] = { type: types[1], value: values[2] + " " };
else
tokens.push({ type: types[1], value: values[3] });
}
var regex = stack[1];
var str = values[3];
var str = values[4];
var m;
var last = 0;
@@ -52,11 +58,7 @@ var C9SearchHighlightRules = function() {
}
},
{
token : ["string", "text"], // single line
regex : "(\\S.*)(:$)"
},
{
regex : "Searching for .*$",
regex : "^Searching for [^\\r\\n]*$",
onMatch: function(val, state, stack) {
var parts = val.split("\x01");
if (parts.length < 3)
@@ -106,11 +108,6 @@ var C9SearchHighlightRules = function() {
});
}
if (replace) {
search = replace;
options = "";
}
if (search) {
if (!/regex/.test(options))
search = lang.escapeRegExp(search);
@@ -131,11 +128,26 @@ var C9SearchHighlightRules = function() {
}
},
{
regex : "\\d+",
token: "constant.numeric"
regex : "^(?=Found \\d+ matches)",
token : "text",
next : "numbers"
},
{
token : "string", // single line
regex : "^\\S:?[^:]+",
next : "numbers"
}
]
],
numbers:[{
regex : "\\d+",
token : "constant.numeric"
}, {
regex : "$",
token : "text",
next : "start"
}]
};
this.normalizeRules();
};
oop.inherits(C9SearchHighlightRules, TextHighlightRules);
@@ -196,20 +208,20 @@ oop.inherits(FoldMode, BaseFoldMode);
(function() {
this.foldingStartMarker = /^(\S.*\:|Searching for.*)$/;
this.foldingStartMarker = /^(\S.*:|Searching for.*)$/;
this.foldingStopMarker = /^(\s+|Found.*)$/;
this.getFoldWidgetRange = function(session, foldStyle, row) {
var lines = session.doc.getAllLines(row);
var line = lines[row];
var level1 = /^(Found.*|Searching for.*)$/;
var level2 = /^(\S.*\:|\s*)$/;
var level2 = /^(\S.*:|\s*)$/;
var re = level1.test(line) ? level1 : level2;
var startRow = row;
var endRow = row;
if (this.foldingStartMarker.test(line)) {
if (this.foldingStartMarker.test(line)) {
for (var i = row + 1, l = session.getLength(); i < l; i++) {
if (re.test(lines[i]))
break;