mirror of
https://github.com/atom/atom.git
synced 2026-01-25 14:59:03 -05: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)
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ class Editor extends View
|
||||
showLineNumbers: true
|
||||
autoIndent: true
|
||||
autoIndentOnPaste: false
|
||||
normalizeIndentOnPaste: false
|
||||
nonWordCharacters: "./\\()\"':,.;<>~!@#$%^&*|+=[]{}`~?-"
|
||||
preferredLineLength: 80
|
||||
|
||||
|
||||
Reference in New Issue
Block a user