mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 20:00:58 +00:00
Merge pull request #19639 from overleaf/jdt-line-tracker-max-callstack-event
Adding events to line-tracker GitOrigin-RevId: 97601af3c332244d10a3e97eb22a80a0eb240ad3
This commit is contained in:
parent
b775f26024
commit
91125f8b1c
1 changed files with 13 additions and 2 deletions
|
@ -111,9 +111,20 @@ export class LineTracker {
|
|||
* |3|yy|
|
||||
* |4|cccc|
|
||||
*/
|
||||
|
||||
const changes = new Array(insertedText.lines).fill(true)
|
||||
this._lines.splice(startLine - 1 + lineShift, 1, ...changes)
|
||||
lineShift += changes.length - 1
|
||||
try {
|
||||
this._lines.splice(startLine - 1 + lineShift, 1, ...changes)
|
||||
lineShift += changes.length - 1
|
||||
} catch (error) {
|
||||
if (error instanceof RangeError) {
|
||||
throw new OError(error.message).withInfo({
|
||||
changesSize: changes.length,
|
||||
})
|
||||
}
|
||||
|
||||
throw error
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue