mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-01-04 12:27:49 +00:00
move guard down to keep surfaceModel logic together
This commit is contained in:
@@ -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(_:)):
|
||||
|
||||
Reference in New Issue
Block a user