diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-12-29 00:21:55 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-12-29 00:21:55 +0000 |
commit | 5caf36d122defc1dbb95b019651dd7a065b0ac73 (patch) | |
tree | fd05e5c3eff6a6b1197ffbdf9963ca737f5c3f77 /apps/gui/list.c | |
parent | bd2f678b7037a3cf14819082e1d9b948cbc099cd (diff) |
Patch #1387569 by Stephan Wezel - page-down doesn't select the element before the last element
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8294 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/list.c')
-rw-r--r-- | apps/gui/list.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c index 4e030c0a5f..83a1fbfb22 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -103,7 +103,10 @@ void gui_list_put_selection_in_screen(struct gui_list * gui_list, int nb_lines=gui_list->display->nb_lines; if(put_from_end) { - int list_end = gui_list->selected_item + SCROLL_LIMIT - 1; + int list_end = gui_list->selected_item + SCROLL_LIMIT; + + if(list_end-1 == gui_list->nb_items) + list_end--; if(list_end > gui_list->nb_items) list_end = nb_lines; gui_list->start_item = list_end - nb_lines; |