feat: add results count to generic palette

closes #401
This commit is contained in:
CJ van den Berg 2025-11-23 19:36:11 +01:00
parent 23e66d8fe9
commit 765a5d2dc7
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -291,7 +291,13 @@ pub fn Create(options: type) type {
return false;
}
fn update_count_hint(self: *Self) void {
self.inputbox.hint.clearRetainingCapacity();
self.inputbox.hint.print(self.inputbox.allocator, "{d}/{d}", .{ self.total_items, self.entries.items.len }) catch {};
}
fn start_query(self: *Self, n: usize) !void {
defer self.update_count_hint();
self.items = 0;
self.menu.reset_items();
self.menu.selected = null;