File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ var CodeMirror = (function() {
6161 // happened during the operation.
6262 var updateInput , changes , textChanged , selectionChanged ;
6363 // Current visible range (may be bigger than the view window).
64- var showingFrom = 0 , showingTo = 0 ;
64+ var showingFrom = 0 , showingTo = 0 , lastHeight = 0 ;
6565 // editing will hold an object describing the things we put in the
6666 // textarea, to help figure out whether something changed.
6767 // bracketHighlighted is used to remember that a backet has been
@@ -654,10 +654,11 @@ var CodeMirror = (function() {
654654
655655 // Position the mover div to align with the lines it's supposed
656656 // to be showing (which will cover the visible display)
657- var different = from != showingFrom || to != showingTo ;
657+ var different = from != showingFrom || to != showingTo || lastHeight != wrapper . clientHeight ;
658658 showingFrom = from ; showingTo = to ;
659659 mover . style . top = ( from * lineHeight ( ) ) + "px" ;
660660 if ( different ) {
661+ lastHeight = wrapper . clientHeight ;
661662 code . style . height = ( lines . length * lineHeight ( ) + 2 * paddingTop ( ) ) + "px" ;
662663 updateGutter ( ) ;
663664 }
You can’t perform that action at this time.
0 commit comments