mirror of https://github.com/status-im/codimd.git
Workaround CodeMirror won't draw selections outside of the viewport which will cause cursor related element blinking on scrolling
This commit is contained in:
parent
30c8420e30
commit
3498b9fae9
File diff suppressed because one or more lines are too long
|
@ -2318,7 +2318,7 @@
|
|||
for (var i = 0; i < doc.sel.ranges.length; i++) {
|
||||
if (primary === false && i == doc.sel.primIndex) continue;
|
||||
var range = doc.sel.ranges[i];
|
||||
if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) continue;
|
||||
//if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) continue;
|
||||
var collapsed = range.empty();
|
||||
if (collapsed || cm.options.showCursorWhenSelecting)
|
||||
drawSelectionCursor(cm, range.head, curFragment);
|
||||
|
|
Loading…
Reference in New Issue