From bd1a100d1711b27ec5ce1713da035ca455c9ab70 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Sat, 2 Feb 2013 15:59:08 -0700 Subject: [PATCH] Always wrap marker screen positions at soft newlines --- src/app/display-buffer.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/display-buffer.coffee b/src/app/display-buffer.coffee index 5f9a27027..1e50f2fc4 100644 --- a/src/app/display-buffer.coffee +++ b/src/app/display-buffer.coffee @@ -316,7 +316,7 @@ class DisplayBuffer delete @markerScreenPositions[id] getMarkerScreenRange: (id) -> - @screenRangeForBufferRange(@getMarkerBufferRange(id)) + @screenRangeForBufferRange(@getMarkerBufferRange(id), wrapAtSoftNewlines: true) setMarkerScreenRange: (id, screenRange, options) -> @setMarkerBufferRange(id, @bufferRangeForScreenRange(screenRange), options) @@ -334,7 +334,7 @@ class DisplayBuffer @getMarkerHeadBufferPosition(id) getMarkerHeadScreenPosition: (id) -> - @screenPositionForBufferPosition(@getMarkerHeadBufferPosition(id)) + @screenPositionForBufferPosition(@getMarkerHeadBufferPosition(id), wrapAtSoftNewlines: true) setMarkerHeadScreenPosition: (id, screenPosition, options) -> screenPosition = @clipScreenPosition(screenPosition, options) @@ -347,7 +347,7 @@ class DisplayBuffer @buffer.setMarkerHeadPosition(id, bufferPosition) getMarkerTailScreenPosition: (id) -> - @screenPositionForBufferPosition(@getMarkerTailBufferPosition(id)) + @screenPositionForBufferPosition(@getMarkerTailBufferPosition(id), wrapAtSoftNewlines: true) setMarkerTailScreenPosition: (id, screenPosition, options) -> screenPosition = @clipScreenPosition(screenPosition, options) @@ -374,7 +374,7 @@ class DisplayBuffer @markerScreenPositionObservers[id].head.push(callback) subscription = @buffer.observeMarkerHeadPosition id, (bufferPosition) => @cacheMarkerScreenPositions(id) - callback(@screenPositionForBufferPosition(bufferPosition)) + callback(@getMarkerHeadScreenPosition(id)) cancel: => subscription.cancel()