diff --git a/src/Linkifier.ts b/src/Linkifier.ts index 88ff1b78..dc04472d 100644 --- a/src/Linkifier.ts +++ b/src/Linkifier.ts @@ -169,10 +169,18 @@ export class Linkifier extends EventEmitter implements ILinkifier { return; } // If the first row is wrapped, backtrack to find the origin row and linkify that + let line = (this._terminal.buffer.lines.get(absoluteRowIndex)); + do { rowIndex--; absoluteRowIndex--; - } while ((this._terminal.buffer.lines.get(absoluteRowIndex)).isWrapped); + line = (this._terminal.buffer.lines.get(absoluteRowIndex)); + + if (!line) { + return; + } + + } while (line.isWrapped); } // Construct full unwrapped line text