From 40512a4823773c70fefb03a01bfa3b48d4d0b569 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 30 Apr 2013 15:07:37 -0600 Subject: [PATCH] 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. --- src/app/fold.coffee | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/app/fold.coffee b/src/app/fold.coffee index 8661dcd54..cc47e7494 100644 --- a/src/app/fold.coffee +++ b/src/app/fold.coffee @@ -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