macos: enter goes to next result
parent
72708b8253
commit
efc05523e0
|
|
@ -412,6 +412,11 @@ extension Ghostty {
|
|||
.background(Color.primary.opacity(0.1))
|
||||
.cornerRadius(6)
|
||||
.focused($isSearchFieldFocused)
|
||||
.onSubmit {
|
||||
guard let surface = surfaceView.surface else { return }
|
||||
let action = "navigate_search:next"
|
||||
ghostty_surface_binding_action(surface, action, UInt(action.count))
|
||||
}
|
||||
.onExitCommand {
|
||||
Ghostty.moveFocus(to: surfaceView)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ extension Ghostty {
|
|||
@Published var searchState: SearchState? = nil {
|
||||
didSet {
|
||||
if let searchState {
|
||||
searchNeedleCancellable = searchState.$needle.sink { [weak self] needle in
|
||||
searchNeedleCancellable = searchState.$needle.removeDuplicates().sink { [weak self] needle in
|
||||
guard let surface = self?.surface else { return }
|
||||
guard needle.count > 1 else { return }
|
||||
let action = "search:\(needle)"
|
||||
|
|
|
|||
Loading…
Reference in New Issue