From d4a2f3db716cc5dc738789098835c528572f0cc3 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 25 Nov 2025 20:38:14 -0800 Subject: [PATCH] macos: search overlay shows search progress --- macos/Sources/Ghostty/SurfaceView.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/macos/Sources/Ghostty/SurfaceView.swift b/macos/Sources/Ghostty/SurfaceView.swift index 1718aeead..47532c96a 100644 --- a/macos/Sources/Ghostty/SurfaceView.swift +++ b/macos/Sources/Ghostty/SurfaceView.swift @@ -426,6 +426,14 @@ extension Ghostty { return .handled } + if let selected = searchState?.selected { + let totalText = searchState?.total.map { String($0) } ?? "?" + Text("\(selected)/\(totalText)") + .font(.caption) + .foregroundColor(.secondary) + .monospacedDigit() + } + Button(action: { guard let surface = surfaceView.surface else { return } let action = "navigate_search:next" @@ -814,6 +822,8 @@ extension FocusedValues { extension Ghostty.SurfaceView { class SearchState: ObservableObject { @Published var needle: String = "" + @Published var selected: UInt? = nil + @Published var total: UInt? = nil init(from startSearch: Ghostty.Action.StartSearch) { self.needle = startSearch.needle ?? ""