Skip to content
Snippets Groups Projects
Commit fac94560 authored by Cheah Chu Yeow's avatar Cheah Chu Yeow Committed by Marijn Haverbeke
Browse files

[active-line addon] Don't highlight line(s) with a selection.

This fixes non-empty selections having 2 highlights: the selection highlight
and the active-line highlight. Non-empty selections should only have the
selection highlight.
parent a6f596d7
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,9 @@
function updateActiveLines(cm, ranges) {
var active = [];
for (var i = 0; i < ranges.length; i++) {
var line = cm.getLineHandleVisualStart(ranges[i].head.line);
var range = ranges[i];
if (!range.empty()) continue;
var line = cm.getLineHandleVisualStart(range.head.line);
if (active[active.length - 1] != line) active.push(line);
}
if (sameArray(cm.state.activeLines, active)) return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment