From 2584468276a2c01621d774dd0d3112486e623936 Mon Sep 17 00:00:00 2001 From: Caleb Norton Date: Sun, 29 Dec 2024 21:23:16 -0600 Subject: [PATCH] macos: correctly save terminal fullscreen style --- .../Sources/Features/Terminal/BaseTerminalController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/macos/Sources/Features/Terminal/BaseTerminalController.swift b/macos/Sources/Features/Terminal/BaseTerminalController.swift index 68c243004..b77e38f7c 100644 --- a/macos/Sources/Features/Terminal/BaseTerminalController.swift +++ b/macos/Sources/Features/Terminal/BaseTerminalController.swift @@ -309,11 +309,11 @@ class BaseTerminalController: NSWindowController, // We consider our mode changed if the types change (obvious) but // also if its nil (not obvious) because nil means that the style has // likely changed but we don't support it. - if newStyle == nil || type(of: newStyle) != type(of: oldStyle) { + if newStyle == nil || type(of: newStyle!) != type(of: oldStyle) { // Our mode changed. Exit fullscreen (since we're toggling anyways) - // and then unset the style so that we replace it next time. + // and then set the new style for future use oldStyle.exit() - self.fullscreenStyle = nil + self.fullscreenStyle = newStyle // We're done return