mirror of
https://github.com/atom/atom.git
synced 2026-02-09 06:05:11 -05:00
Add LineWrapper.tokensForScreenRow
This commit is contained in:
@@ -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++
|
||||
|
||||
Reference in New Issue
Block a user