From 88f55c958ad541d466af7948fc0ddfa24f06bed0 Mon Sep 17 00:00:00 2001 From: Julian Viereck Date: Sun, 24 Apr 2011 22:46:22 +0200 Subject: [PATCH] Fix active line highlighter in folded row --- lib/ace/editor.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/ace/editor.js b/lib/ace/editor.js index 51d86da7..d8a57998 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -322,8 +322,14 @@ var Editor =function(renderer, session) { session.$highlightLineMarker = null; if (this.getHighlightActiveLine() && (this.getSelectionStyle() != "line" || !this.selection.isMultiLine())) { - var cursor = this.getCursorPosition(); - var range = new Range(cursor.row, 0, cursor.row+1, 0); + var cursor = this.getCursorPosition(), + foldLine = this.session.getFoldLine(cursor.row); + var range; + if (foldLine) { + range = new Range(foldLine.start.row, 0, foldLine.end.row + 1, 0); + } else { + range = new Range(cursor.row, 0, cursor.row+1, 0); + } session.$highlightLineMarker = session.addMarker(range, "ace_active_line", "line"); } };