From 5bd814adf8b2fad4f7d8ca7c05776c8dcb6cd35a Mon Sep 17 00:00:00 2001 From: Yasu Flores Date: Mon, 22 Dec 2025 08:53:43 -0600 Subject: [PATCH] move guard down to keep surfaceModel logic together --- macos/Sources/Ghostty/SurfaceView_AppKit.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macos/Sources/Ghostty/SurfaceView_AppKit.swift b/macos/Sources/Ghostty/SurfaceView_AppKit.swift index c54f674a5..37cc9282e 100644 --- a/macos/Sources/Ghostty/SurfaceView_AppKit.swift +++ b/macos/Sources/Ghostty/SurfaceView_AppKit.swift @@ -1910,7 +1910,6 @@ extension Ghostty.SurfaceView: NSTextInputClient { /// 1. Prevents an audible NSBeep for unimplemented actions. /// 2. Allows us to properly encode super+key input events that we don't handle override func doCommand(by selector: Selector) { - guard let surfaceModel else { return } // If we are being processed by performKeyEquivalent with a command binding, // we send it back through the event system so it can be encoded. if let lastPerformKeyEvent, @@ -1921,6 +1920,7 @@ extension Ghostty.SurfaceView: NSTextInputClient { return } + guard let surfaceModel else { return } // Process MacOS native scroll events switch selector { case #selector(moveToBeginningOfDocument(_:)):