From 33b8635d06f785f9d088d4c9485d89f00898424a Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Fri, 18 Sep 2026 11:42:09 +0200 Subject: bokftui: PgUp/PgDn clamp to the first/last row in lists select_list refused to move when fewer than a full page remained; menu already clamped. Matches the menu behaviour now. --- clients/bokftui.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'clients/bokftui.c') diff --git a/clients/bokftui.c b/clients/bokftui.c index 1514126..25e5464 100644 --- a/clients/bokftui.c +++ b/clients/bokftui.c @@ -766,10 +766,10 @@ static int select_list(const char *title, char **items, int n, int start, sel--; else if (ch == KEY_DOWN && sel < n - 1) sel++; - else if (ch == KEY_NPAGE && sel + view < n) - sel += view; - else if (ch == KEY_PPAGE && sel - view >= 0) - sel -= view; + else if (ch == KEY_NPAGE) + sel = sel + view < n ? sel + view : n - 1; + else if (ch == KEY_PPAGE) + sel = sel - view > 0 ? sel - view : 0; else if (ch == KEY_HOME) sel = 0; else if (ch == KEY_END) -- cgit v1.3