Don’t attempt to preserve mouseWheelScreenRow if it’s deleted

Fixes #5527
This commit is contained in:
Nathan Sobo
2015-02-23 10:47:21 -08:00
parent e55e84506b
commit 2e8c5855d4
2 changed files with 7 additions and 2 deletions

View File

@@ -228,8 +228,8 @@ class TextEditorPresenter
row++
if @mouseWheelScreenRow?
preservedLine = @model.tokenizedLineForScreenRow(@mouseWheelScreenRow)
visibleLineIds[preservedLine.id] = true
if preservedLine = @model.tokenizedLineForScreenRow(@mouseWheelScreenRow)
visibleLineIds[preservedLine.id] = true
for id, line of @state.content.lines
unless visibleLineIds.hasOwnProperty(id)