mirror of
https://github.com/atom/atom.git
synced 2026-02-04 19:54:59 -05:00
Only indent the line following a '\n' not the line preceding it
This commit is contained in:
@@ -273,8 +273,10 @@ class Selection
|
||||
else
|
||||
@cursor.setBufferPosition(newBufferRange.end, skipAtomicTokens: true) if wasReversed
|
||||
|
||||
if options.autoIndent or (options.autoIndentNewline and text == '\n')
|
||||
if options.autoIndent
|
||||
@editSession.autoIndentBufferRow(row) for row in newBufferRange.getRows()
|
||||
else if options.autoIndentNewline and text == '\n'
|
||||
@editSession.autoIndentBufferRow(newBufferRange.end.row)
|
||||
else if options.autoDecreaseIndent and /\S/.test text
|
||||
@editSession.autoDecreaseIndentForRow(newBufferRange.start.row)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user