mirror of
https://github.com/atom/atom.git
synced 2026-02-17 01:51:54 -05:00
Ignore leading whitespace when auto-indenting a newline
Refs atom/language-less#1
This commit is contained in:
@@ -301,7 +301,7 @@ class Selection
|
||||
if options.autoIndent
|
||||
@editor.autoIndentBufferRow(row) for row in newBufferRange.getRows()
|
||||
else if options.autoIndentNewline and text == '\n'
|
||||
@editor.autoIndentBufferRow(newBufferRange.end.row)
|
||||
@editor.autoIndentBufferRow(newBufferRange.end.row, ignoreLeadingWhitespace: true)
|
||||
else if options.autoDecreaseIndent and /\S/.test text
|
||||
@editor.autoDecreaseIndentForBufferRow(newBufferRange.start.row)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user