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:
47
vendor/assets/javascripts/ace/worker-xml.js
vendored
47
vendor/assets/javascripts/ace/worker-xml.js
vendored
@ -1,19 +1,20 @@
|
||||
"no use strict";
|
||||
;(function(window) {
|
||||
!(function(window) {
|
||||
if (typeof window.window != "undefined" && window.document)
|
||||
return;
|
||||
if (window.require && window.define)
|
||||
return;
|
||||
|
||||
window.console = function() {
|
||||
var msgs = Array.prototype.slice.call(arguments, 0);
|
||||
postMessage({type: "log", data: msgs});
|
||||
};
|
||||
window.console.error =
|
||||
window.console.warn =
|
||||
window.console.log =
|
||||
window.console.trace = window.console;
|
||||
|
||||
if (!window.console) {
|
||||
window.console = function() {
|
||||
var msgs = Array.prototype.slice.call(arguments, 0);
|
||||
postMessage({type: "log", data: msgs});
|
||||
};
|
||||
window.console.error =
|
||||
window.console.warn =
|
||||
window.console.log =
|
||||
window.console.trace = window.console;
|
||||
}
|
||||
window.window = window;
|
||||
window.ace = window;
|
||||
|
||||
@ -290,7 +291,7 @@ exports.copyArray = function(array){
|
||||
var copy = [];
|
||||
for (var i=0, l=array.length; i<l; i++) {
|
||||
if (array[i] && typeof array[i] == "object")
|
||||
copy[i] = this.copyObject( array[i] );
|
||||
copy[i] = this.copyObject(array[i]);
|
||||
else
|
||||
copy[i] = array[i];
|
||||
}
|
||||
@ -308,14 +309,12 @@ exports.deepCopy = function deepCopy(obj) {
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
var cons = obj.constructor;
|
||||
if (cons === RegExp)
|
||||
if (Object.prototype.toString.call(obj) !== "[object Object]")
|
||||
return obj;
|
||||
|
||||
copy = cons();
|
||||
for (var key in obj) {
|
||||
copy = {};
|
||||
for (var key in obj)
|
||||
copy[key] = deepCopy(obj[key]);
|
||||
}
|
||||
return copy;
|
||||
};
|
||||
|
||||
@ -562,7 +561,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
||||
if (!this.isMultiLine()) {
|
||||
if (row === this.start.row) {
|
||||
return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (row < this.start.row)
|
||||
@ -639,9 +638,9 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
||||
};
|
||||
this.collapseRows = function() {
|
||||
if (this.end.column == 0)
|
||||
return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
|
||||
return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0);
|
||||
else
|
||||
return new Range(this.start.row, 0, this.end.row, 0)
|
||||
return new Range(this.start.row, 0, this.end.row, 0);
|
||||
};
|
||||
this.toScreenRange = function(session) {
|
||||
var screenPosStart = session.documentToScreenPosition(this.start);
|
||||
@ -735,7 +734,7 @@ exports.applyDelta = function(docLines, delta, doNotValidate) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
|
||||
@ -796,7 +795,7 @@ EventEmitter.once = function(eventName, callback) {
|
||||
|
||||
|
||||
EventEmitter.setDefaultHandler = function(eventName, callback) {
|
||||
var handlers = this._defaultHandlers
|
||||
var handlers = this._defaultHandlers;
|
||||
if (!handlers)
|
||||
handlers = this._defaultHandlers = {_disabled_: {}};
|
||||
|
||||
@ -813,7 +812,7 @@ EventEmitter.setDefaultHandler = function(eventName, callback) {
|
||||
handlers[eventName] = callback;
|
||||
};
|
||||
EventEmitter.removeDefaultHandler = function(eventName, callback) {
|
||||
var handlers = this._defaultHandlers
|
||||
var handlers = this._defaultHandlers;
|
||||
if (!handlers)
|
||||
return;
|
||||
var disabled = handlers._disabled_[eventName];
|
||||
@ -1102,7 +1101,7 @@ var Document = function(textOrLines) {
|
||||
return this.removeFullLines(firstRow, lastRow);
|
||||
};
|
||||
this.insertNewLine = function(position) {
|
||||
console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead.");
|
||||
console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
|
||||
return this.insertMergedLines(position, ["", ""]);
|
||||
};
|
||||
this.insert = function(position, text) {
|
||||
@ -1245,7 +1244,7 @@ var Document = function(textOrLines) {
|
||||
}
|
||||
};
|
||||
this.replace = function(range, text) {
|
||||
if (!range instanceof Range)
|
||||
if (!(range instanceof Range))
|
||||
range = Range.fromPoints(range.start, range.end);
|
||||
if (text.length === 0 && range.isEmpty())
|
||||
return range.start;
|
||||
|
Reference in New Issue
Block a user