Sha256: 4f00c8c0ce7a4bb2a6679de38f4e8169de770966e204f9eaf2863b2f0c46925f
Contents?: true
Size: 1.47 KB
Versions: 1
Compression:
Stored size: 1.47 KB
Contents
define('ace/ext/statusbar', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/lang'], function(require, exports, module) { 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)); editor.on("changeStatus", function() { statusUpdate.schedule(100); }); editor.on("changeSelection", function() { statusUpdate.schedule(100); }); }; (function(){ this.updateStatus = function(editor) { var status = []; function add(str, separator) { str && status.push(str, separator || "|"); } if (editor.$vimModeHandler) add(editor.$vimModeHandler.getStatusText()); else if (editor.commands.recording) add("REC"); var c = editor.selection.lead; add(c.row + ":" + c.column, " "); if (!editor.selection.isEmpty()) { var r = editor.getSelectionRange(); add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")"); } status.pop(); this.element.textContent = status.join(""); }; }).call(StatusBar.prototype); exports.StatusBar = StatusBar; });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ace-rails-ap-2.0.1 | vendor/assets/javascripts/ace/ext-statusbar.js |