mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
Scroll list if last item have been deleted.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
9a9e003243
commit
43ca270f99
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user