scroll to top-most/bottom-most buffer position

This commit is contained in:
Luke Pommersheim
2015-08-28 11:24:57 +02:00
parent 3a5abef3af
commit 2b7d220dbc

View File

@@ -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: ->