Fix visible region after loading list box items

Make sure the visible region is updated after loading items, e.g. when
the users switches from the full todo list to the "uncompleted items
only" view.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer 2016-10-30 11:42:24 +01:00
parent cf75caeb61
commit fd97187bcd

View File

@ -126,6 +126,7 @@ void listbox_load_items(struct listbox *lb, int item_count)
else if (lb->item_sel >= item_count) else if (lb->item_sel >= item_count)
lb->item_sel = item_count - 1; lb->item_sel = item_count - 1;
listbox_fix_sel(lb, 1); listbox_fix_sel(lb, 1);
listbox_fix_visible_region(lb);
} }
void listbox_draw_deco(struct listbox *lb, int hilt) void listbox_draw_deco(struct listbox *lb, int hilt)