macos: only end search if we previously had one

This commit is contained in:
Mitchell Hashimoto
2025-11-25 21:42:05 -08:00
parent 48acc90983
commit 1bb2d4f1c2

View File

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