mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Rename autoDecreaseIndentForRow to autoDecreaseIndentForBufferRow
This commit is contained in:
@@ -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()", ->
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user