From b8d02dedde2aa48cad33fae9a31a7c86bb1ba605 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 11 Aug 2015 15:15:48 -0600 Subject: [PATCH] Use row-oriented methods --- src/text-editor.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 2fe1aa7f9..10cb3a385 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -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