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 | |
parent | bd2f678b7037a3cf14819082e1d9b948cbc099cd (diff) | |
download | rockbox-5caf36d122defc1dbb95b019651dd7a065b0ac73.tar.gz rockbox-5caf36d122defc1dbb95b019651dd7a065b0ac73.zip |
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
-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, | |||
103 | int nb_lines=gui_list->display->nb_lines; | 103 | int nb_lines=gui_list->display->nb_lines; |
104 | if(put_from_end) | 104 | if(put_from_end) |
105 | { | 105 | { |
106 | int list_end = gui_list->selected_item + SCROLL_LIMIT - 1; | 106 | int list_end = gui_list->selected_item + SCROLL_LIMIT; |
107 | |||
108 | if(list_end-1 == gui_list->nb_items) | ||
109 | list_end--; | ||
107 | if(list_end > gui_list->nb_items) | 110 | if(list_end > gui_list->nb_items) |
108 | list_end = nb_lines; | 111 | list_end = nb_lines; |
109 | gui_list->start_item = list_end - nb_lines; | 112 | gui_list->start_item = list_end - nb_lines; |