mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
Merge pull request #7798 from atom/ns-undefined-screen-line-metadata
Report extra metadata when screen lines are undefined when clipping
This commit is contained in:
@@ -890,6 +890,17 @@ class DisplayBuffer extends Model
|
||||
column = 0
|
||||
|
||||
screenLine = @tokenizedLineForScreenRow(row)
|
||||
unless screenLine?
|
||||
error = new Error("Undefined screen line when clipping screen position")
|
||||
Error.captureStackTrace(error)
|
||||
error.metadata = {
|
||||
screenRow: row
|
||||
screenColumn: column
|
||||
maxScreenRow: @getLastRow()
|
||||
screenLinesDefined: @screenLines.map (sl) -> sl?
|
||||
}
|
||||
throw error
|
||||
|
||||
maxScreenColumn = screenLine.getMaxScreenColumn()
|
||||
|
||||
if screenLine.isSoftWrapped() and column >= maxScreenColumn
|
||||
|
||||
Reference in New Issue
Block a user