mirror of
https://github.com/atom/atom.git
synced 2026-02-12 07:35:14 -05:00
Use row-oriented methods
This commit is contained in:
committed by
Luke Pommersheim
parent
6d2c4b61b4
commit
b8d02dedde
@@ -837,8 +837,8 @@ class TextEditor extends Model
|
||||
rows.pop() unless @isFoldedAtBufferRow(selection.end.row)
|
||||
|
||||
# Move line around the fold that is directly above the selection
|
||||
precedingScreenRow = @screenPositionForBufferPosition([selection.start.row]).translate([-1])
|
||||
precedingBufferRow = @bufferPositionForScreenPosition(precedingScreenRow).row
|
||||
precedingScreenRow = @screenRowForBufferRow(selection.start.row) - 1
|
||||
precedingBufferRow = @bufferRowForScreenRow(precedingScreenRow)
|
||||
if fold = @largestFoldContainingBufferRow(precedingBufferRow)
|
||||
insertDelta = fold.getBufferRange().getRowCount()
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user