Add Editor::lineTextForScreenRow()

Closes #3055
This commit is contained in:
Ben Ogle
2014-09-03 14:08:43 -07:00
parent 5e21d1ca5b
commit 523a255e48
2 changed files with 11 additions and 0 deletions

View File

@@ -418,6 +418,12 @@ class Editor extends Model
deprecate 'Use Editor::lineTextForBufferRow(bufferRow) instead'
@lineTextForBufferRow(bufferRow)
# Public: Returns a {String} representing the contents of the line at the
# given screen row.
#
# * `screenRow` A {Number} representing a zero-indexed screen row.
lineTextForScreenRow: (screenRow) -> @displayBuffer.tokenizedLineForScreenRow(screenRow).text
# Gets the screen line for the given screen row.
#
# * `screenRow` - A {Number} indicating the screen row.