Rename editor.autoIndentPastedText to editor.autoIndentOnPaste

This commit is contained in:
Corey Johnson 2013-01-10 09:42:20 -08:00
parent d2521ca8b8
commit d53572d54d
2 changed files with 4 additions and 5 deletions

View File

@ -1946,7 +1946,7 @@ describe "EditSession", ->
editSession.indent()
expect(editSession.lineForBufferRow(2)).toBe " "
describe "editor.autoIndentPastedText", ->
describe "editor.autoIndentOnPaste", ->
it "does not auto-indent pasted text by default", ->
editSession.setCursorBufferPosition([2, 0])
editSession.insertText("0\n 2\n 4\n")
@ -1958,8 +1958,8 @@ describe "EditSession", ->
expect(editSession.lineForBufferRow(3)).toBe " 2"
expect(editSession.lineForBufferRow(4)).toBe " 4"
it "auto-indents pasted text when editor.autoIndentPastedText is true", ->
config.set("editor.autoIndentPastedText", true)
it "auto-indents pasted text when editor.autoIndentOnPaste is true", ->
config.set("editor.autoIndentOnPaste", true)
editSession.setCursorBufferPosition([2, 0])
editSession.insertText("0\n 2\n 4\n")
editSession.getSelection().setBufferRange([[2,0], [5,0]])

View File

@ -161,7 +161,7 @@ class EditSession
config.get("editor.autoIndent") ? true
shouldAutoIndentPastedText: ->
config.get("editor.autoIndentPastedText") ? false
config.get("editor.autoIndentOnPaste") ? false
insertText: (text, options={}) ->
options.autoIndent ?= @shouldAutoIndent()
@ -230,7 +230,6 @@ class EditSession
[text, metadata] = pasteboard.read()
_.extend(options, metadata) if metadata
console.log options
@insertText(text, options)
undo: ->