Fix active line highlighter in folded row
This commit is contained in:
parent
273a1e41d1
commit
88f55c958a
1 changed files with 8 additions and 2 deletions
|
|
@ -322,8 +322,14 @@ var Editor =function(renderer, session) {
|
||||||
session.$highlightLineMarker = null;
|
session.$highlightLineMarker = null;
|
||||||
|
|
||||||
if (this.getHighlightActiveLine() && (this.getSelectionStyle() != "line" || !this.selection.isMultiLine())) {
|
if (this.getHighlightActiveLine() && (this.getSelectionStyle() != "line" || !this.selection.isMultiLine())) {
|
||||||
var cursor = this.getCursorPosition();
|
var cursor = this.getCursorPosition(),
|
||||||
var range = new Range(cursor.row, 0, cursor.row+1, 0);
|
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");
|
session.$highlightLineMarker = session.addMarker(range, "ace_active_line", "line");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue