diff --git a/lib/ace/css/editor.css b/lib/ace/css/editor.css index f59da076..e610ca44 100644 --- a/lib/ace/css/editor.css +++ b/lib/ace/css/editor.css @@ -81,6 +81,7 @@ } .ace_cursor-layer { + z-index: 0; cursor: text; pointer-events: none; } diff --git a/lib/ace/editor.js b/lib/ace/editor.js index 6be9b875..39e5ca4e 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -1,4 +1,5 @@ -/* ***** BEGIN LICENSE BLOCK ***** +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version @@ -20,6 +21,7 @@ * * Contributor(s): * Fabian Jakobs + * Irakli Gozalishvili (http://jeditoolkit.com) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or @@ -196,6 +198,14 @@ var Editor =function(renderer, session) { this.renderer.setTheme(theme); }; + this.setStyle = function(style) { + this.renderer.setStyle(style) + }; + + this.unsetStyle = function(style) { + this.renderer.unsetStyle(style) + } + this.$highlightBrackets = function() { if (this.$bracketHighlight) { this.renderer.removeMarker(this.$bracketHighlight); diff --git a/lib/ace/theme/twilight.js b/lib/ace/theme/twilight.js index 36fb8953..600ba519 100644 --- a/lib/ace/theme/twilight.js +++ b/lib/ace/theme/twilight.js @@ -85,6 +85,10 @@ define(function(require, exports, module) { .ace-twilight .ace_cursor.ace_overwrite {\ border-left: 0px;\ border-bottom: 1px solid #A7A7A7;\ +}\ +.ace-twilight.normal-mode .ace_cursor.ace_overwrite {\ + border: 1px solid #FFE300;\ + background: #766B13;\ }\ \ .ace-twilight .ace_marker-layer .ace_selection {\ diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js index edcaa3d9..47444ee4 100644 --- a/lib/ace/virtual_renderer.js +++ b/lib/ace/virtual_renderer.js @@ -1,4 +1,5 @@ -/* ***** BEGIN LICENSE BLOCK ***** +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version @@ -658,6 +659,18 @@ var VirtualRenderer = function(container, theme) { } }; + // Methods allows to add / remove CSS classnames to the editor element. + // This feature can be used by plug-ins to provide a visual indication of + // a certain mode that editor is in. + + this.setStyle = function setStyle(style) { + dom.addCssClass(this.container, style) + }; + + this.unsetStyle = function unsetStyle(style) { + dom.removeCssClass(this.container, style) + }; + }).call(VirtualRenderer.prototype); exports.VirtualRenderer = VirtualRenderer;