mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-09 19:36:45 +00:00
macos: avoid any zero-sized content size increments (#9020)
Fixes #9016
This commit is contained in:
@@ -728,6 +728,10 @@ class BaseTerminalController: NSWindowController,
|
|||||||
|
|
||||||
func cellSizeDidChange(to: NSSize) {
|
func cellSizeDidChange(to: NSSize) {
|
||||||
guard derivedConfig.windowStepResize else { return }
|
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
|
self.window?.contentResizeIncrements = to
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user