File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -207,12 +207,12 @@ CanvasTextEditor.prototype.render = function() {
207207 var baselineOffset = this . _metrics . getBaseline ( ) ,
208208 lineHeight = this . _metrics . getHeight ( ) ,
209209 characterWidth = this . _metrics . getWidth ( ) ,
210- maxHeight = Math . ceil ( this . canvas . height / lineHeight ) ,
210+ maxHeight = Math . ceil ( this . canvas . height / lineHeight ) + this . _scrollTop ,
211211 lineCount = this . _document . getLineCount ( ) ,
212212 selectionRanges = this . _selection . lineRanges ( ) ,
213213 selectionWidth = 0 ;
214214
215- // Making sure we don't render somethign that we won't see
215+ // Making sure we don't render something that we won't see
216216 if ( lineCount < maxHeight ) maxHeight = lineCount ;
217217
218218 // Clearing previous iteration
@@ -221,7 +221,7 @@ CanvasTextEditor.prototype.render = function() {
221221 this . context . fillStyle = this . options . textColor ;
222222
223223 // Looping over document lines
224- for ( var i = this . _scrollTop ; i < maxHeight + this . _scrollTop ; ++ i ) {
224+ for ( var i = this . _scrollTop ; i < maxHeight ; ++ i ) {
225225 var topOffset = lineHeight * ( i - this . _scrollTop ) ;
226226
227227 // Rendering selection for this line if one is present
You can’t perform that action at this time.
0 commit comments