mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-05 03:14:14 +00:00
feat(macos): focus surface view if search box is manually closed
This commit is contained in:
@@ -190,7 +190,12 @@ extension Ghostty {
|
||||
SurfaceSearchOverlay(
|
||||
surfaceView: surfaceView,
|
||||
searchState: searchState,
|
||||
onClose: { surfaceView.searchState = nil }
|
||||
onClose: {
|
||||
#if canImport(AppKit)
|
||||
Ghostty.moveFocus(to: surfaceView)
|
||||
#endif
|
||||
surfaceView.searchState = nil
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -432,7 +437,6 @@ extension Ghostty {
|
||||
#if canImport(AppKit)
|
||||
.onExitCommand {
|
||||
if searchState.needle.isEmpty {
|
||||
Ghostty.moveFocus(to: surfaceView)
|
||||
onClose()
|
||||
} else {
|
||||
Ghostty.moveFocus(to: surfaceView)
|
||||
|
||||
Reference in New Issue
Block a user