refactor: tweak max hints window size

This commit is contained in:
CJ van den Berg 2025-12-02 14:38:52 +01:00
parent d069250d17
commit 4e4ec855ed
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -54,7 +54,7 @@ fn render(mode: *keybind.Mode, bindings: []const keybind.Binding, theme: *const
const max_len = max_prefix_len + max_description_len + 2 + 2;
const widget_style = tui.get_widget_style(widget_type);
const scr = tui.screen();
const max_screen_height = scr.h -| widget_style.padding.top -| widget_style.padding.bottom -| 1;
const max_screen_height = scr.h -| widget_style.padding.top -| widget_style.padding.bottom -| 3;
const max_items = @min(bindings.len, max_screen_height);
const page_size = max_screen_height;
var top = show_page * page_size;