set autoscroll to false when setting new buffer ranges

This commit is contained in:
Luke Pommersheim
2015-08-30 11:10:24 +02:00
parent 5ed6657d47
commit 57c17f8e56

View File

@@ -879,7 +879,7 @@ class TextEditor extends Model
for selection in selectionsToMove
newSelectionRanges.push(selection.translate([-insertDelta, 0]))
@setSelectedBufferRanges(newSelectionRanges)
@setSelectedBufferRanges(newSelectionRanges, {autoscroll: false, preserveFolds: true})
@scrollToBufferPosition([newSelectionRanges[0].start.row + 2, 0])
# Move lines intersecting the most recent selection or muiltiple selections down by one row in screen
@@ -941,7 +941,7 @@ class TextEditor extends Model
for selection in selectionsToMove
newSelectionRanges.push(selection.translate([insertDelta, 0]))
@setSelectedBufferRanges(newSelectionRanges, {preserveFolds: true})
@setSelectedBufferRanges(newSelectionRanges, {autoscroll: false, preserveFolds: true})
@scrollToBufferPosition([newSelectionRanges[0].start.row - 1, 0])
# Duplicate the most recent cursor's current line.