Add TextEditor.prototype.tokensForScreenRow for testing purposes

This commit is contained in:
Antonio Scandurra
2016-03-22 14:49:29 +01:00
parent b1e07c0cfe
commit 326f2c6a9e
2 changed files with 15 additions and 14 deletions

View File

@@ -778,6 +778,10 @@ class TextEditor extends Model
lineTextForScreenRow: (screenRow) ->
@screenLineForScreenRow(screenRow)?.lineText
tokensForScreenRow: (screenRow) ->
for tagCode in @screenLineForScreenRow(screenRow).tagCodes when @displayLayer.isOpenTagCode(tagCode)
@displayLayer.tagForCode(tagCode)
screenLineForScreenRow: (screenRow) ->
@displayLayer.getScreenLines(screenRow, screenRow + 1)[0]