diff --git a/src/app/display-buffer-marker.coffee b/src/app/display-buffer-marker.coffee index 9c4142a49..92d389ccb 100644 --- a/src/app/display-buffer-marker.coffee +++ b/src/app/display-buffer-marker.coffee @@ -144,6 +144,9 @@ class DisplayBufferMarker getAttributes: -> @bufferMarker.getAttributes() + setAttributes: (attributes) -> + @bufferMarker.setAttributes(attributes) + matchesAttributes: (attributes) -> @bufferMarker.matchesAttributes(attributes) diff --git a/src/app/selection.coffee b/src/app/selection.coffee index 9f84d7a8d..5adf1a2ca 100644 --- a/src/app/selection.coffee +++ b/src/app/selection.coffee @@ -108,7 +108,7 @@ class Selection # Clears the selection, moving the marker to move to the head. clear: -> - @setGoalBufferRange(null) + @marker.setAttributes(goalBufferRange: null) @marker.clearTail() unless @retainSelection # Modifies the selection to mark the current word. @@ -232,9 +232,6 @@ class Selection getGoalBufferRange: -> @marker.getAttributes().goalBufferRange - setGoalBufferRange: (goalBufferRange) -> - @marker.getAttributes().goalBufferRange = goalBufferRange - # Moves the selection up one row. addSelectionAbove: -> range = (@getGoalBufferRange() ? @getBufferRange()).copy() @@ -514,14 +511,13 @@ class Selection # otherSelection - A `Selection` to merge with # options - A hash of options matching those found in {.setBufferRange} merge: (otherSelection, options) -> - @setBufferRange(@getBufferRange().union(otherSelection.getBufferRange()), options) - myGoalBufferRange = @getGoalBufferRange() otherGoalBufferRange = otherSelection.getGoalBufferRange() if myGoalBufferRange? and otherGoalBufferRange? - @setGoalBufferRange(myGoalBufferRange.union(otherGoalBufferRange)) - else if otherGoalBufferRange - @setGoalBufferRange(otherGoalBufferRange) + options.goalBufferRange = myGoalBufferRange.union(otherGoalBufferRange) + else + options.goalBufferRange = myGoalBufferRange ? otherGoalBufferRange + @setBufferRange(@getBufferRange().union(otherSelection.getBufferRange()), options) otherSelection.destroy() ### Internal ### diff --git a/vendor/telepath b/vendor/telepath index 8337309f3..c25fa296d 160000 --- a/vendor/telepath +++ b/vendor/telepath @@ -1 +1 @@ -Subproject commit 8337309f31ed5660760ca0eac8ea4bbb9877c7f2 +Subproject commit c25fa296d0b27f6254604e8adb6de6f45cf9e2b0