Fix exception when resizing both dimensions

This happened because buffers now resize themselves but they were
relying on Terminal to give them a blank line. The blank line was
coming back with the old columns value, causing an NPE.

Fixes #860
This commit is contained in:
Daniel Imms
2017-08-08 12:59:02 -07:00
parent a28d9f1456
commit bb526aaa88
5 changed files with 22 additions and 7 deletions
+3 -2
View 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;