mirror of
https://github.com/atom/atom.git
synced 2026-02-07 21:25:05 -05:00
@@ -133,11 +133,11 @@ class Buffer
|
||||
lineLengthForRow: (row) ->
|
||||
@lines[row].length
|
||||
|
||||
rangeForRow: (row) ->
|
||||
if row == @getLastRow()
|
||||
new Range([row, 0], [row, @lineLengthForRow(row)])
|
||||
else
|
||||
rangeForRow: (row, { includeNewline } = {}) ->
|
||||
if includeNewline and row < @getLastRow()
|
||||
new Range([row, 0], [row + 1, 0])
|
||||
else
|
||||
new Range([row, 0], [row, @lineLengthForRow(row)])
|
||||
|
||||
getLineCount: ->
|
||||
@getLines().length
|
||||
|
||||
Reference in New Issue
Block a user