macos: avoid any zero-sized content size increments (#9020)

Fixes #9016
pull/9021/head
Mitchell Hashimoto 2025-10-03 13:52:42 -07:00 committed by GitHub
commit afa3d5e087
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -743,6 +743,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
}