diff options
Diffstat (limited to 'apps/gui/list.c')
-rw-r--r-- | apps/gui/list.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c index 466ab2904b..9b4211cd48 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c | |||
@@ -504,9 +504,16 @@ static void gui_list_select_at_offset(struct gui_list * gui_list, int offset) | |||
504 | int nb_lines = gui_list->display->nb_lines; | 504 | int nb_lines = gui_list->display->nb_lines; |
505 | if (SHOW_LIST_TITLE) | 505 | if (SHOW_LIST_TITLE) |
506 | nb_lines--; | 506 | nb_lines--; |
507 | offset *= gui_list->selected_size; | 507 | |
508 | gui_list->selected_item += offset; | ||
509 | 508 | ||
509 | if (gui_list->selected_size > 1) | ||
510 | { | ||
511 | offset *= gui_list->selected_size; | ||
512 | /* always select the first item of multi-line lists */ | ||
513 | offset -= offset%gui_list->selected_size; | ||
514 | } | ||
515 | gui_list->selected_item += offset; | ||
516 | |||
510 | if (offset < 0) /* moving up the list */ | 517 | if (offset < 0) /* moving up the list */ |
511 | { | 518 | { |
512 | if (gui_list->selected_item < 0) | 519 | if (gui_list->selected_item < 0) |