Scroll list if last item have been deleted.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2010-02-03 14:11:54 +00:00
parent 9a9e003243
commit 43ca270f99

View File

@ -2338,8 +2338,13 @@ listbox_key (WListbox *l, int key)
return j;
case KEY_DC:
if (l->deletable)
if (l->deletable) {
gboolean is_last = (l->pos + 1 == l->count);
listbox_remove_current (l);
if (is_last && (l->top > 0))
l->top--;
}
return MSG_HANDLED;
default: