mirror of
https://github.com/atom/atom.git
synced 2026-02-12 07:35:14 -05:00
Don’t move any lines if some lines can’t move
This commit is contained in:
committed by
Luke Pommersheim
parent
de500ce41a
commit
b14f3d8d92
@@ -825,12 +825,14 @@ class TextEditor extends Model
|
||||
selections = @getSelectedBufferRanges()
|
||||
selections.sort (a, b) -> a.compare(b)
|
||||
|
||||
if selections[0].start.row is 0
|
||||
return
|
||||
|
||||
if selections[selections.length - 1].start.row is @getLastBufferRow() and @buffer.getLastLine() is ''
|
||||
return
|
||||
|
||||
@transact =>
|
||||
for selection in selections
|
||||
continue if selection.start.row is 0
|
||||
lastRow = @buffer.getLastRow()
|
||||
continue if selection.isEmpty() and selection.start.row is lastRow and @buffer.getLastLine() is ''
|
||||
|
||||
foldedRows = []
|
||||
rows = [selection.start.row..selection.end.row]
|
||||
if selection.start.row isnt selection.end.row and selection.end.column is 0
|
||||
|
||||
Reference in New Issue
Block a user