diff --git a/src/renderer/terminal/TerminalSessionManager.ts b/src/renderer/terminal/TerminalSessionManager.ts index 4e01f009d..163dd8ce7 100644 --- a/src/renderer/terminal/TerminalSessionManager.ts +++ b/src/renderer/terminal/TerminalSessionManager.ts @@ -203,6 +203,7 @@ export class TerminalSessionManager { const updateCustomFont = (customFont?: string) => { this.customFontFamily = customFont?.trim() ?? ''; this.applyEffectiveFont(); + this.scheduleFit(); }; const updateCustomFontSize = (size: number) => { @@ -552,6 +553,7 @@ export class TerminalSessionManager { this.captureViewportPosition(); this.cancelScheduledFit(); this.clearQueuedResize(); + this.lastSentResize = null; this.resizeObserver?.disconnect(); this.resizeObserver = null; ensureTerminalHost().appendChild(this.container); @@ -567,6 +569,7 @@ export class TerminalSessionManager { setTheme(theme: SessionTheme) { this.lastTheme = theme; this.applyTheme(theme); + this.scheduleFit(); } dispose() {