mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Enhance error when a line component is not found for a screen line
Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
committed by
Nathan Sobo
parent
74ae169fcc
commit
f45c0236ab
@@ -2227,13 +2227,16 @@ class TextEditorComponent {
|
||||
const lineComponent = this.lineComponentsByScreenLineId.get(screenLine.id)
|
||||
|
||||
if (!lineComponent) {
|
||||
const error = new Error('Requested measurement of a line that is not currently rendered')
|
||||
const error = new Error('Requested measurement of a line component that is not currently rendered')
|
||||
error.metadata = {
|
||||
row,
|
||||
columnsToMeasure,
|
||||
renderedScreenLineIds: this.renderedScreenLines.map((line) => line.id),
|
||||
extraRenderedScreenLineIds: Array.from(this.extraRenderedScreenLines.keys()),
|
||||
lineNodeScreenLineIds: Array.from(this.lineNodesByScreenLineId.keys())
|
||||
lineComponentScreenLineIds: Array.from(this.lineComponentsByScreenLineId.keys()),
|
||||
renderedStartRow: this.getRenderedStartRow(),
|
||||
renderedEndRow: this.getRenderedEndRow(),
|
||||
requestedScreenLineId: screenLine.id
|
||||
}
|
||||
throw error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user