From 1bb2d4f1c23e5686192b7ef36dd579e4aa4ffda7 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 25 Nov 2025 21:42:05 -0800 Subject: [PATCH] macos: only end search if we previously had one --- macos/Sources/Ghostty/SurfaceView_AppKit.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macos/Sources/Ghostty/SurfaceView_AppKit.swift b/macos/Sources/Ghostty/SurfaceView_AppKit.swift index f431fdf6d..e2feb79c4 100644 --- a/macos/Sources/Ghostty/SurfaceView_AppKit.swift +++ b/macos/Sources/Ghostty/SurfaceView_AppKit.swift @@ -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:"