mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 18:24:09 +03: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:
commit
9c63de930e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user