mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Merge remote-tracking branch 'origin/master' into ns-empty-panes
This commit is contained in:
@@ -269,10 +269,9 @@ class Editor extends Model
|
||||
# * newLevel:
|
||||
# A {Number} indicating the new indentation level.
|
||||
setIndentationForBufferRow: (bufferRow, newLevel) ->
|
||||
currentLevel = @indentationForBufferRow(bufferRow)
|
||||
currentIndentString = @buildIndentString(currentLevel)
|
||||
currentIndentLength = @lineForBufferRow(bufferRow).match(/^\s*/)[0].length
|
||||
newIndentString = @buildIndentString(newLevel)
|
||||
@buffer.change([[bufferRow, 0], [bufferRow, currentIndentString.length]], newIndentString)
|
||||
@buffer.change([[bufferRow, 0], [bufferRow, currentIndentLength]], newIndentString)
|
||||
|
||||
# Public: Returns the indentation level of the given line of text.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user