mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Use editSession.lineForBufferRow()
Rather than the buffer directly.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user