From 7820608b04a6d3b83b4ef428b196842210b3d4c0 Mon Sep 17 00:00:00 2001 From: rhodes-b <59537185+rhodes-b@users.noreply.github.com> Date: Sun, 30 Nov 2025 14:32:13 -0600 Subject: [PATCH] if search has text already update the search state with matches --- src/apprt/gtk/class/search_overlay.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/apprt/gtk/class/search_overlay.zig b/src/apprt/gtk/class/search_overlay.zig index 2595cefa2..ffa9174b2 100644 --- a/src/apprt/gtk/class/search_overlay.zig +++ b/src/apprt/gtk/class/search_overlay.zig @@ -231,6 +231,10 @@ pub const SearchOverlay = extern struct { // Select all text in the search entry field. -1 is distance from // the end, causing the entire text to be selected. priv.search_entry.as(gtk.Editable).selectRegion(0, -1); + + // update search state with the active text + const text = priv.search_entry.as(gtk.Editable).getText(); + signals.@"search-changed".impl.emit(self, null, .{text}, null); } /// Set the total number of search matches.