mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-30 12:15:32 +01:00
f5a135b01f
The provideAltTextQuickFix method calls document.lineAt(range.start.line) without validating that the line number is within bounds. When the document is modified between when VS Code computes the range and when the code action provider executes, an out-of-bounds line number causes 'Illegal value for `line`' to be thrown. Add a bounds check before calling lineAt() so the method returns early instead of throwing. Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>