mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-12-28 17:14:39 +00:00
GTK: update search state from previous search on activation (#9765)
I think it makes sense that if there was already text from the previous search that it should match based on that, this doesnt remove that it highlights everything so you can press backspace to delete and start from a empty search
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user