mirror of
https://github.com/atom/atom.git
synced 2026-02-14 08:35:11 -05:00
Invalidate empty lines proceeding a change event
The indent guide on empty lines will now be updated when the non-empty line preceeding the empty lines is updated.
This commit is contained in:
@@ -1006,6 +1006,18 @@ class Editor extends View
|
||||
return [] if !@firstRenderedScreenRow? and !@lastRenderedScreenRow?
|
||||
|
||||
intactRanges = [{start: @firstRenderedScreenRow, end: @lastRenderedScreenRow, domStart: 0}]
|
||||
|
||||
if @showIndentGuide
|
||||
trailingEmptyLineChanges = []
|
||||
for change in @pendingChanges
|
||||
continue unless change.bufferDelta?
|
||||
start = change.end + change.bufferDelta + 1
|
||||
continue unless @lineForBufferRow(start) is ''
|
||||
end = start
|
||||
end++ while @lineForBufferRow(end + 1) is ''
|
||||
trailingEmptyLineChanges.push({start, end, screenDelta: 0})
|
||||
@pendingChanges.push(trailingEmptyLineChanges...)
|
||||
|
||||
for change in @pendingChanges
|
||||
newIntactRanges = []
|
||||
for range in intactRanges
|
||||
|
||||
Reference in New Issue
Block a user