diff --git a/src/app/buffer-marker.coffee b/src/app/buffer-marker.coffee index 9677d5b15..8063214e4 100644 --- a/src/app/buffer-marker.coffee +++ b/src/app/buffer-marker.coffee @@ -74,19 +74,19 @@ class BufferMarker # Returns a {Range}. getRange: -> if @tailPosition - new Range(@tailPosition, @headPosition) + new Range(@getTailPosition(), @getHeadPosition()) else - new Range(@headPosition, @headPosition) + new Range(@getHeadPosition(), @getHeadPosition()) # Public: Retrieves the position of the marker's head. # # Returns a {Point}. - getHeadPosition: -> @headPosition + getHeadPosition: -> @headPosition?.copy() # Public: Retrieves the position of the marker's tail. # # Returns a {Point}. - getTailPosition: -> @tailPosition ? @getHeadPosition() + getTailPosition: -> @tailPosition?.copy() ? @getHeadPosition() # Public: Sets the position of the marker's head. #