Update ACE Editor to version 1.32.6
This commit is contained in:

committed by
Sebastian Serth

parent
0a473c7fd3
commit
b00d45521b
59
vendor/assets/javascripts/ace/ext-statusbar.js
vendored
59
vendor/assets/javascripts/ace/ext-statusbar.js
vendored
@ -1,53 +1,48 @@
|
||||
define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var dom = require("ace/lib/dom");
|
||||
var lang = require("ace/lib/lang");
|
||||
|
||||
var StatusBar = function(editor, parentNode) {
|
||||
this.element = dom.createElement("div");
|
||||
this.element.className = "ace_status-indicator";
|
||||
this.element.style.cssText = "display: inline-block;";
|
||||
parentNode.appendChild(this.element);
|
||||
|
||||
var statusUpdate = lang.delayedCall(function(){
|
||||
this.updateStatus(editor);
|
||||
}.bind(this)).schedule.bind(null, 100);
|
||||
|
||||
editor.on("changeStatus", statusUpdate);
|
||||
editor.on("changeSelection", statusUpdate);
|
||||
editor.on("keyboardActivity", statusUpdate);
|
||||
};
|
||||
|
||||
(function(){
|
||||
this.updateStatus = function(editor) {
|
||||
define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"], function(require, exports, module){"use strict";
|
||||
var dom = require("../lib/dom");
|
||||
var lang = require("../lib/lang");
|
||||
var StatusBar = /** @class */ (function () {
|
||||
function StatusBar(editor, parentNode) {
|
||||
this.element = dom.createElement("div");
|
||||
this.element.className = "ace_status-indicator";
|
||||
this.element.style.cssText = "display: inline-block;";
|
||||
parentNode.appendChild(this.element);
|
||||
var statusUpdate = lang.delayedCall(function () {
|
||||
this.updateStatus(editor);
|
||||
}.bind(this)).schedule.bind(null, 100);
|
||||
editor.on("changeStatus", statusUpdate);
|
||||
editor.on("changeSelection", statusUpdate);
|
||||
editor.on("keyboardActivity", statusUpdate);
|
||||
}
|
||||
StatusBar.prototype.updateStatus = function (editor) {
|
||||
var status = [];
|
||||
function add(str, separator) {
|
||||
str && status.push(str, separator || "|");
|
||||
}
|
||||
|
||||
add(editor.keyBinding.getStatusText(editor));
|
||||
if (editor.commands.recording)
|
||||
add("REC");
|
||||
|
||||
var sel = editor.selection;
|
||||
var c = sel.lead;
|
||||
|
||||
if (!sel.isEmpty()) {
|
||||
var r = editor.getSelectionRange();
|
||||
add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")", " ");
|
||||
add("(" + (r.end.row - r.start.row) + ":" + (r.end.column - r.start.column) + ")", " ");
|
||||
}
|
||||
add(c.row + ":" + c.column, " ");
|
||||
add(c.row + ":" + c.column, " ");
|
||||
if (sel.rangeCount)
|
||||
add("[" + sel.rangeCount + "]", " ");
|
||||
status.pop();
|
||||
this.element.textContent = status.join("");
|
||||
};
|
||||
}).call(StatusBar.prototype);
|
||||
|
||||
return StatusBar;
|
||||
}());
|
||||
exports.StatusBar = StatusBar;
|
||||
|
||||
});
|
||||
(function() {
|
||||
window.require(["ace/ext/statusbar"], function() {});
|
||||
}); (function() {
|
||||
window.require(["ace/ext/statusbar"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
Reference in New Issue
Block a user