🐛 Fix auto indent no longer applied when moving lines

This commit is contained in:
abe33
2015-11-04 18:56:13 +01:00
parent 849dd33e87
commit aa7f87bd62

View File

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