macos: only end search if we previously had one

pull/9709/head
Mitchell Hashimoto 2025-11-25 21:42:05 -08:00
parent 48acc90983
commit 1bb2d4f1c2
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ extension Ghostty {
let action = "search:\(needle)" let action = "search:\(needle)"
ghostty_surface_binding_action(surface, action, UInt(action.count)) ghostty_surface_binding_action(surface, action, UInt(action.count))
} }
} else { } else if oldValue != nil {
searchNeedleCancellable = nil searchNeedleCancellable = nil
guard let surface = self.surface else { return } guard let surface = self.surface else { return }
let action = "search:" let action = "search:"