mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Revert "Revert "Allow pasting white space when autoIndentOnPaste is enabled""
This reverts commit 5c03894227.
This commit is contained in:
@@ -378,7 +378,7 @@ class Selection extends Model
|
||||
indentAdjustment = @editor.indentLevelForLine(precedingText) - options.indentBasis
|
||||
@adjustIndent(remainingLines, indentAdjustment)
|
||||
|
||||
if options.autoIndent and not NonWhitespaceRegExp.test(precedingText) and remainingLines.length > 0
|
||||
if options.autoIndent and NonWhitespaceRegExp.test(text) and not NonWhitespaceRegExp.test(precedingText) and remainingLines.length > 0
|
||||
autoIndentFirstLine = true
|
||||
firstLine = precedingText + firstInsertedLine
|
||||
desiredIndentLevel = @editor.languageMode.suggestedIndentForLineAtBufferRow(oldBufferRange.start.row, firstLine)
|
||||
|
||||
Reference in New Issue
Block a user