Ensure change doesn't precede rendered range when updating foldability

This commit is contained in:
Nathan Sobo
2014-01-20 11:39:30 -07:00
parent 2831b43042
commit d965e9f56c

View File

@@ -228,7 +228,7 @@ class Gutter extends View
# anyway.
updateFoldableClasses: (changes) ->
editor = @getEditor()
for {start, end} in changes when start <= @lastScreenRow
for {start, end} in changes when start <= @lastScreenRow and end >= @firstScreenRow
startScreenRow = Math.max(start - 1, @firstScreenRow)
endScreenRow = Math.min(end + 1, @lastScreenRow)
lastBufferRow = null