From 2b7d220dbc947d60d5bd84bfc34ae4ea77eca0f9 Mon Sep 17 00:00:00 2001 From: Luke Pommersheim Date: Fri, 28 Aug 2015 11:24:57 +0200 Subject: [PATCH] scroll to top-most/bottom-most buffer position --- src/text-editor.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 5215466fe..17101ead7 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -880,6 +880,7 @@ class TextEditor extends Model newSelectionRanges.push(selection.translate([-insertDelta, 0])) @setSelectedBufferRanges(newSelectionRanges) + @scrollToBufferPosition([newSelectionRanges[0].start.row + 2, 0]) # Move lines intersecting the most recent selection or muiltiple selections down by one row in screen # coordinates. @@ -941,6 +942,7 @@ class TextEditor extends Model newSelectionRanges.push(selection.translate([insertDelta, 0])) @setSelectedBufferRanges(newSelectionRanges, {preserveFolds: true}) + @scrollToBufferPosition([newSelectionRanges[0].start.row - 1, 0]) # Duplicate the most recent cursor's current line. duplicateLines: ->