Fix the fit addon
This commit is contained in:
@@ -24,6 +24,10 @@ export class BackgroundRenderLayer extends BaseRenderLayer {
|
||||
}
|
||||
|
||||
public onGridChanged(terminal: ITerminal, startRow: number, endRow: number): void {
|
||||
// Resize has not been called yet
|
||||
if (this._state.cache.length === 0) {
|
||||
return;
|
||||
}
|
||||
for (let y = startRow; y <= endRow; y++) {
|
||||
let row = y + terminal.buffer.ydisp;
|
||||
let line = terminal.buffer.lines.get(row);
|
||||
|
||||
@@ -32,6 +32,11 @@ export class ForegroundRenderLayer extends BaseRenderLayer {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// Resize has not been called yet
|
||||
if (this._state.cache.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (let y = startRow; y <= endRow; y++) {
|
||||
const row = y + terminal.buffer.ydisp;
|
||||
const line = terminal.buffer.lines.get(row);
|
||||
|
||||
@@ -18,7 +18,7 @@ export class GridCache<T> {
|
||||
this.cache.length = width;
|
||||
}
|
||||
|
||||
public clear() {
|
||||
public clear(): void {
|
||||
for (let x = 0; x < this.cache.length; x++) {
|
||||
for (let y = 0; y < this.cache[x].length; y++) {
|
||||
this.cache[x][y] = null;
|
||||
|
||||
Reference in New Issue
Block a user