diff --git a/src/app/edit-session.coffee b/src/app/edit-session.coffee index f78dcb228..066765ff8 100644 --- a/src/app/edit-session.coffee +++ b/src/app/edit-session.coffee @@ -60,9 +60,8 @@ class EditSession @mergeCursors() @displayBuffer.on "change.edit-session-#{@id}", (e) => + @refreshAnchorScreenPositions() unless e.bufferChange @trigger 'screen-lines-change', e - unless e.bufferChange - anchor.refreshScreenPosition() for anchor in @getAnchors() destroy: -> throw new Error("Edit session already destroyed") if @destroyed @@ -332,6 +331,9 @@ class EditSession removeAnchor: (anchor) -> _.remove(@anchors, anchor) + refreshAnchorScreenPositions: -> + anchor.refreshScreenPosition() for anchor in @getAnchors() + removeAnchorRange: (anchorRange) -> _.remove(@anchorRanges, anchorRange)