Rename autoDecreaseIndentForRow to autoDecreaseIndentForBufferRow

This commit is contained in:
probablycorey
2013-05-07 16:01:33 -07:00
parent e70d6d1f8f
commit 93b1ce53c0
3 changed files with 6 additions and 6 deletions

View File

@@ -2472,14 +2472,14 @@ describe "EditSession", ->
describe ".autoDecreaseIndentForRow()", ->
it "doesn't outdent the first and only row", ->
editSession.selectAll()
editSession.insertText("}")
editSession.autoDecreaseIndentForRow(0)
expect(editSession.lineForBufferRow(0)).toBe "}"
editSession.insertText(" }")
editSession.autoDecreaseIndentForBufferRow(0)
expect(editSession.lineForBufferRow(0)).toBe " }"
it "doesn't outdent a row that is already fully outdented", ->
editSession.selectAll()
editSession.insertText("var i;\n}")
editSession.autoDecreaseIndentForRow(1)
editSession.autoDecreaseIndentForBufferRow(1)
expect(editSession.lineForBufferRow(1)).toBe "}"
describe ".destroy()", ->

View File

@@ -600,7 +600,7 @@ class EditSession
# Given a buffer row, this decreases the indentation.
#
# bufferRow - The row {Number}
autoDecreaseIndentForRow: (bufferRow) ->
autoDecreaseIndentForBufferRow: (bufferRow) ->
@languageMode.autoDecreaseIndentForBufferRow(bufferRow)
# Wraps the lines between two rows in comments.

View File

@@ -278,7 +278,7 @@ class Selection
else if options.autoIndentNewline and text == '\n'
@editSession.autoIndentBufferRow(newBufferRange.end.row)
else if options.autoDecreaseIndent and /\S/.test text
@editSession.autoDecreaseIndentForRow(newBufferRange.start.row)
@editSession.autoDecreaseIndentForBufferRow(newBufferRange.start.row)
newBufferRange