mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Add config option editor.normalizeIndentOnPaste
This commit is contained in:
@@ -475,10 +475,11 @@ class EditSession
|
||||
#
|
||||
# options - A set of options equivalent to {Selection.insertText}.
|
||||
pasteText: (options={}) ->
|
||||
options.autoIndent ?= @shouldAutoIndentPastedText()
|
||||
|
||||
[text, metadata] = pasteboard.read()
|
||||
_.extend(options, metadata) if metadata
|
||||
|
||||
options.autoIndent ?= @shouldAutoIndentPastedText()
|
||||
if config.get('editor.normalizeIndentOnPaste') and metadata
|
||||
options.indentBasis ?= metadata.indentBasis
|
||||
|
||||
@insertText(text, options)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user