Always mutate selections in order

This commit is contained in:
Antonio Scandurra
2015-04-02 16:35:26 +02:00
parent 44d88e082c
commit b3bdad084f
2 changed files with 21 additions and 3 deletions

View File

@@ -843,7 +843,7 @@ class TextEditor extends Model
mutateSelectedText: (fn) ->
@mergeIntersectingSelections =>
@transact =>
fn(selection, index) for selection, index in @getSelections()
fn(selection, index) for selection, index in @getSelectionsOrderedByBufferPosition()
# Move lines intersection the most recent selection up by one row in screen
# coordinates.