From 5d1e7469a1335321056cd7e8c2f5f352fd047543 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 11 Aug 2015 15:34:40 -0600 Subject: [PATCH] Reassign selection range immediately when moving lines up --- src/text-editor.coffee | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 2355587e2..0400a1b56 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -821,7 +821,6 @@ class TextEditor extends Model # Move lines intersection the most recent selection or multiple selections up by one row in screen # coordinates. moveLineUp: -> - newSelectionBufferRanges = [] selections = @getSelectionsOrderedByBufferPosition() if selections[0].getBufferRange().start.row is 0 @@ -872,9 +871,7 @@ class TextEditor extends Model for foldedRow in foldedRows when 0 <= foldedRow <= @getLastBufferRow() @foldBufferRow(foldedRow) - newSelectionBufferRanges.push(selectionRange.translate([-insertDelta])) - - @setSelectedBufferRanges(newSelectionBufferRanges, preserveFolds: true, autoscroll: true) + selection.setBufferRange(selectionRange.translate([-insertDelta, 0])) # Move lines intersecting the most recent selection or muiltiple selections down by one row in screen # coordinates.