diff --git a/src/apprt/gtk/class/search_overlay.zig b/src/apprt/gtk/class/search_overlay.zig index 17ff5861e..f1e56ed37 100644 --- a/src/apprt/gtk/class/search_overlay.zig +++ b/src/apprt/gtk/class/search_overlay.zig @@ -185,6 +185,9 @@ pub const SearchOverlay = extern struct { pub fn grabFocus(self: *Self) void { const priv = self.private(); _ = priv.search_entry.as(gtk.Widget).grabFocus(); + + // 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); }