Add LineWrapper.tokensForScreenRow

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-02-08 12:55:51 -07:00
parent 1ec29e29d7
commit 1566b12ecc
2 changed files with 10 additions and 5 deletions

View File

@@ -69,7 +69,6 @@ class LineWrapper
new Point(row, column)
bufferPositionFromScreenPosition: (screenPosition) ->
screenPosition = Point.fromObject(screenPosition)
bufferRow = 0
@@ -81,3 +80,9 @@ class LineWrapper
currentScreenRow++
bufferRow++
tokensForScreenRow: (screenRow) ->
currentScreenRow = 0
for screenLines in @lines
for screenLine in screenLines
return screenLine if currentScreenRow == screenRow
currentScreenRow++