Use editSession.lineForBufferRow()

Rather than the buffer directly.
This commit is contained in:
Ben Ogle
2013-07-17 17:51:40 -07:00
parent c52cf836cd
commit c937827582

View File

@@ -189,8 +189,7 @@ class LanguageMode
#
# Returns a {Number} of the indent level of the block of lines.
minIndentLevelForRowRange: (startRow, endRow) ->
buffer = @editSession.buffer
indents = (@editSession.indentationForBufferRow(row) for row in [startRow..endRow] when buffer.lineForRow(row).trim())
indents = (@editSession.indentationForBufferRow(row) for row in [startRow..endRow] when @editSession.lineForBufferRow(row).trim())
Math.min(indents...)
# Indents all the rows between two buffer row numbers.