Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion html/src/components/terminal/xterm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export class Xterm {
private reconnect = true;
private doReconnect = true;
private closeOnDisconnect = false;
private preferencesApplied = false;

private writeFunc = (data: ArrayBuffer) => this.writeData(new Uint8Array(data));

Expand Down Expand Up @@ -166,7 +167,6 @@ export class Xterm {
terminal.loadAddon(webLinksAddon);

terminal.open(parent);
fitAddon.fit();
}

@bind
Expand Down Expand Up @@ -466,6 +466,14 @@ export class Xterm {
break;
}
}

if (!this.preferencesApplied) {
this.preferencesApplied = true;

requestAnimationFrame(() => {
fitAddon.fit();
});
}
}

@bind
Expand Down