mirror of
https://github.com/atom/atom.git
synced 2026-02-16 17:45:24 -05:00
Don't update the DisplayBuffer when a fold's marker changes
Because we don't currently allow for direct manipulation of fold marker ranges, if a fold's marker changes it will be because of a buffer change. This buffer change will bubble to the display buffer anyway, where the screen line update will account for the change to the fold's marker range.
This commit is contained in:
@@ -14,10 +14,6 @@ class Fold
|
||||
constructor: (@displayBuffer, @marker) ->
|
||||
@displayBuffer.foldsByMarkerId[@marker.id] = this
|
||||
@updateDisplayBuffer()
|
||||
@marker.on 'changed', (e) =>
|
||||
oldRange = new Range(e.oldHeadBufferPosition, e.oldTailBufferPosition)
|
||||
newRange = new Range(e.newHeadBufferPosition, e.newTailBufferPosition)
|
||||
@updateDisplayBuffer() unless newRange.isEqual(oldRange)
|
||||
@marker.on 'destroyed', => @destroyed()
|
||||
|
||||
# Returns whether this fold is contained within another fold
|
||||
|
||||
Reference in New Issue
Block a user