mirror of
https://github.com/atom/atom.git
synced 2026-02-07 21:25:05 -05:00
🐛 Guard against unexisting screen rows
This commit is contained in:
@@ -783,6 +783,7 @@ class TextEditor extends Model
|
||||
@displayLayer.tagForCode(tagCode)
|
||||
|
||||
screenLineForScreenRow: (screenRow) ->
|
||||
return if screenRow < 0 or screenRow > @getLastScreenRow()
|
||||
@displayLayer.getScreenLines(screenRow, screenRow + 1)[0]
|
||||
|
||||
bufferRowForScreenRow: (row) -> @displayLayer.translateScreenPosition(Point(row, 0)).row
|
||||
|
||||
Reference in New Issue
Block a user