We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6636fd commit 4bd311cCopy full SHA for 4bd311c
src/extension/xtab/node/xtabProvider.ts
@@ -1112,6 +1112,10 @@ export class XtabProvider implements IStatelessNextEditProvider {
1112
if (isNaN(lineNumber) || lineNumber < 0) {
1113
throw new Error(`parsed line number is NaN or negative: ${trimmed}`);
1114
}
1115
+ if (lineNumber > promptPieces.currentDocument.lines.length) {
1116
+ this.tracer.trace(`Predicted line number ${lineNumber} is out of bounds, document has ${promptPieces.currentDocument.lines.length} lines`);
1117
+ return undefined;
1118
+ }
1119
1120
return lineNumber;
1121
} catch (err) {
0 commit comments