Prevent Uncaught TypeError

- Cannot read property 'isWrapped' on Linkifier
This commit is contained in:
Bruno Ribeito
2018-07-15 19:36:49 +01:00
parent b84dba2e8d
commit 18f37440dc
+9 -1
View File
@@ -169,10 +169,18 @@ export class Linkifier extends EventEmitter implements ILinkifier {
return; return;
} }
// If the first row is wrapped, backtrack to find the origin row and linkify that // If the first row is wrapped, backtrack to find the origin row and linkify that
let line = (<any>this._terminal.buffer.lines.get(absoluteRowIndex));
do { do {
rowIndex--; rowIndex--;
absoluteRowIndex--; absoluteRowIndex--;
} while ((<any>this._terminal.buffer.lines.get(absoluteRowIndex)).isWrapped); line = (<any>this._terminal.buffer.lines.get(absoluteRowIndex));
if (!line) {
return;
}
} while (line.isWrapped);
} }
// Construct full unwrapped line text // Construct full unwrapped line text