mirror of
https://github.com/atom/atom.git
synced 2026-02-12 07:35:14 -05:00
Reassign selection range immediately when moving lines up
This commit is contained in:
committed by
Luke Pommersheim
parent
7d98fc141f
commit
5d1e7469a1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user