From d8d232e5a24a45cfaea128ae1ac55aadee531bdf Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 3 Oct 2025 13:52:42 -0700 Subject: [PATCH] macos: avoid any zero-sized content size increments (#9020) Fixes #9016 --- macos/Sources/Features/Terminal/BaseTerminalController.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/macos/Sources/Features/Terminal/BaseTerminalController.swift b/macos/Sources/Features/Terminal/BaseTerminalController.swift index 2de967daf..a56d070b4 100644 --- a/macos/Sources/Features/Terminal/BaseTerminalController.swift +++ b/macos/Sources/Features/Terminal/BaseTerminalController.swift @@ -728,6 +728,10 @@ class BaseTerminalController: NSWindowController, func cellSizeDidChange(to: NSSize) { guard derivedConfig.windowStepResize else { return } + // Stage manager can sometimes present windows in such a way that the + // cell size is temporarily zero due to the window being tiny. We can't + // set content resize increments to this value, so avoid an assertion failure. + guard to.width > 0 && to.height > 0 else { return } self.window?.contentResizeIncrements = to }