Skip to content

Commit ee07146

Browse files
committed
Check, after updating display, if viewport is really filled
Due to changed line heights, the rendered content might not reach to the viewport bottom. Issue #1147
1 parent 21380af commit ee07146

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/codemirror.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,9 @@ window.CodeMirror = (function() {
503503
display.viewOffset = heightAtLine(cm, getLine(doc, from));
504504
// Position the mover div to align with the current virtual scroll position
505505
display.mover.style.top = display.viewOffset + "px";
506+
507+
if (visibleLines(display, doc, viewPort).to >= to)
508+
updateDisplayInner(cm, [], viewPort);
506509
return true;
507510
}
508511

0 commit comments

Comments
 (0)