feat(macos): if the search box is empty directly close the box

pull/10384/head
Nishant Joshi 2026-01-18 10:08:51 -08:00
parent 9fb03ba55c
commit c8f56ddaf8
No known key found for this signature in database
1 changed files with 6 additions and 1 deletions

View File

@ -431,7 +431,12 @@ extension Ghostty {
}
#if canImport(AppKit)
.onExitCommand {
Ghostty.moveFocus(to: surfaceView)
if searchState.needle.isEmpty {
Ghostty.moveFocus(to: surfaceView)
onClose()
} else {
Ghostty.moveFocus(to: surfaceView)
}
}
#endif
.backport.onKeyPress(.return) { modifiers in