]> git.proxmox.com Git - mirror_xterm.js.git/blobdiff - src/utils/TestUtils.ts
Fix exception when resizing both dimensions
[mirror_xterm.js.git] / src / utils / TestUtils.ts
index fbb172616e84b72664767dfac51bfe628d5f08ba..eae34cc0c24adf8ded662ef733f9b1eb50478fbd 100644 (file)
@@ -43,9 +43,10 @@ export class MockTerminal implements ITerminal {
   showCursor(): void {
     throw new Error('Method not implemented.');
   }
-  blankLine(cur?: boolean, isWrapped?: boolean) {
+  blankLine(cur?: boolean, isWrapped?: boolean, cols?: number) {
     const line = [];
-    for (let i = 0; i < this.cols; i++) {
+    cols = cols || this.cols;
+    for (let i = 0; i < cols; i++) {
       line.push([0, ' ', 1]);
     }
     return line;