Fix active line highlighter in folded row

This commit is contained in:
Julian Viereck 2011-04-24 22:46:22 +02:00
commit 88f55c958a

View file

@ -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");
}
};