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
2 changed files with 11 additions and 11 deletions
20
public/vendor/codemirror/codemirror.min.js
vendored
20
public/vendor/codemirror/codemirror.min.js
vendored
File diff suppressed because one or more lines are too long
2
public/vendor/codemirror/lib/codemirror.js
vendored
2
public/vendor/codemirror/lib/codemirror.js
vendored
|
@ -2318,7 +2318,7 @@
|
||||||
for (var i = 0; i < doc.sel.ranges.length; i++) {
|
for (var i = 0; i < doc.sel.ranges.length; i++) {
|
||||||
if (primary === false && i == doc.sel.primIndex) continue;
|
if (primary === false && i == doc.sel.primIndex) continue;
|
||||||
var range = doc.sel.ranges[i];
|
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();
|
var collapsed = range.empty();
|
||||||
if (collapsed || cm.options.showCursorWhenSelecting)
|
if (collapsed || cm.options.showCursorWhenSelecting)
|
||||||
drawSelectionCursor(cm, range.head, curFragment);
|
drawSelectionCursor(cm, range.head, curFragment);
|
||||||
|
|
Loading…
Reference in a new issue