Skip to content

Commit 03aa2bd

Browse files
Adam Ahmedmarijnh
authored andcommitted
Fix #2460 and #2355 using technique from #2282
1 parent 3aea0bf commit 03aa2bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/codemirror.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4339,6 +4339,7 @@ window.CodeMirror = (function() {
43394339
if (!ws.length) this.line.widgets = null;
43404340
var aboveVisible = heightAtLine(this.cm, this.line) < this.cm.doc.scrollTop;
43414341
updateLineHeight(this.line, Math.max(0, this.line.height - widgetHeight(this)));
4342+
this.cm.curOp.forceUpdate = true;
43424343
if (aboveVisible) addToScrollPos(this.cm, 0, -this.height);
43434344
regChange(this.cm, no, no + 1);
43444345
});
@@ -4348,6 +4349,7 @@ window.CodeMirror = (function() {
43484349
var diff = widgetHeight(this) - oldH;
43494350
if (!diff) return;
43504351
updateLineHeight(this.line, this.line.height + diff);
4352+
this.cm.curOp.forceUpdate = true;
43514353
var no = lineNo(this.line);
43524354
regChange(this.cm, no, no + 1);
43534355
});

0 commit comments

Comments
 (0)