mirror of
https://github.com/atom/atom.git
synced 2026-02-12 07:35:14 -05:00
Compute insertDelta more simply
This commit is contained in:
committed by
Luke Pommersheim
parent
b8d02dedde
commit
de500ce41a
@@ -839,10 +839,7 @@ class TextEditor extends Model
|
||||
# Move line around the fold that is directly above the selection
|
||||
precedingScreenRow = @screenRowForBufferRow(selection.start.row) - 1
|
||||
precedingBufferRow = @bufferRowForScreenRow(precedingScreenRow)
|
||||
if fold = @largestFoldContainingBufferRow(precedingBufferRow)
|
||||
insertDelta = fold.getBufferRange().getRowCount()
|
||||
else
|
||||
insertDelta = 1
|
||||
insertDelta = selection.start.row - precedingBufferRow
|
||||
|
||||
for row in rows
|
||||
if fold = @displayBuffer.largestFoldStartingAtBufferRow(row)
|
||||
|
||||
Reference in New Issue
Block a user