automatically hide activeLine highlight if editor height is one line

This commit is contained in:
nightwing 2013-07-19 17:59:37 +04:00
commit f447430c10
2 changed files with 2 additions and 1 deletions

View file

@ -119,7 +119,6 @@ exports.singleLineEditor = function(el) {
new MultiSelect(editor);
editor.session.setUndoManager(new UndoManager());
editor.setHighlightActiveLine(false);
editor.setShowPrintMargin(false);
editor.renderer.setShowGutter(false);
editor.renderer.setHighlightGutterLine(false);

View file

@ -624,6 +624,8 @@ var Editor = function(renderer, session) {
if (this.$highlightActiveLine) {
if ((this.$selectionStyle != "line" || !this.selection.isMultiLine()))
highlight = this.getCursorPosition();
if (this.renderer.$maxLines && this.session.getLength() === 1)
highlight = false;
}
if (session.$highlightLineMarker && !highlight) {