summaryrefslogtreecommitdiff
path: root/macos
diff options
context:
space:
mode:
authorMitchell Hashimoto <m@mitchellh.com>2025-10-03 13:35:36 -0700
committerMitchell Hashimoto <m@mitchellh.com>2025-10-03 13:35:40 -0700
commit77114d79270de31d84987bd9861f862280e6108f (patch)
tree05c341691259ee2ee678c41acebc5fff5778bf47 /macos
parentb99ca6ad97b6e28041344d5b4f67e0a8be70f976 (diff)
macos: avoid any zero-sized content size increments
Fixes #9016
Diffstat (limited to 'macos')
-rw-r--r--macos/Sources/Features/Terminal/BaseTerminalController.swift4
1 files changed, 4 insertions, 0 deletions
diff --git a/macos/Sources/Features/Terminal/BaseTerminalController.swift b/macos/Sources/Features/Terminal/BaseTerminalController.swift
index a34be4125..f660ea3ad 100644
--- a/macos/Sources/Features/Terminal/BaseTerminalController.swift
+++ b/macos/Sources/Features/Terminal/BaseTerminalController.swift
@@ -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
}