Merge pull request #146203 from microsoft/tyriar/145508

Don't check lines too short for shell integration link
This commit is contained in:
Daniel Imms 2022-03-28 11:56:46 -07:00 committed by GitHub
commit 1cb0dea143
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,6 +51,9 @@ export class TerminalShellIntegrationLinkDetector implements ITerminalLinkDetect
}
private _matches(lines: IBufferLine[]): boolean {
if (lines.length < linkCodes.length) {
return false;
}
let cell: IBufferCell | undefined;
for (let i = 0; i < linkCodes.length; i++) {
cell = lines[Math.floor(i / this.xterm.cols)].getCell(i % this.xterm.cols, cell);