Rename autoIndentNewlines to autoIndentNewline

This commit is contained in:
probablycorey
2013-05-07 15:22:36 -07:00
parent 38d4e3a097
commit 1f025817f1
2 changed files with 3 additions and 3 deletions

View File

@@ -366,7 +366,7 @@ class EditSession
# text - A {String} representing the text to insert.
# options - A set of options equivalent to {Selection.insertText}
insertText: (text, options={}) ->
options.autoIndentNewlines ?= @shouldAutoIndent()
options.autoIndentNewline ?= @shouldAutoIndent()
options.autoDecreaseIndent ?= @shouldAutoIndent()
@mutateSelectedText (selection) -> selection.insertText(text, options)

View File

@@ -256,7 +256,7 @@ class Selection
# options - A hash containing the following options:
# select: if `true`, selects the newly added text
# autoIndent: if `true`, indents all inserted text appropriately
# autoIndentNewlines: if `true`, indent newlines appropriately
# autoIndentNewline: if `true`, indent newline appropriately
# autoDecreaseIndent: if `true`, decreases indent level appropriately (for example, when a closing bracket is inserted)
insertText: (text, options={}) ->
@@ -273,7 +273,7 @@ class Selection
else
@cursor.setBufferPosition(newBufferRange.end, skipAtomicTokens: true) if wasReversed
if options.autoIndent or (options.autoIndentNewlines and text == '\n')
if options.autoIndent or (options.autoIndentNewline and text == '\n')
@editSession.autoIndentBufferRow(row) for row in newBufferRange.getRows()
else if options.autoDecreaseIndent and /\S/.test text
@editSession.autoDecreaseIndentForRow(newBufferRange.start.row)