diff --git a/src/screen_keydef.c b/src/screen_keydef.c
index 3261bc936d52226f8d069fcc8cea06af97377879..6585bc45825e7aa331689eef64a9dd1f2405d371 100644 (file)
--- a/src/screen_keydef.c
+++ b/src/screen_keydef.c
} else
subcmd_addpos = 0;
subcmd_length += STATIC_SUB_ITEMS;
+ list_window_set_length(lw, subcmd_length);
}
static void
}
subcmd = -1;
- list_window_check_selected(lw, LIST_LENGTH());
+ list_window_set_length(lw, LIST_LENGTH());
}
static void
static bool
keydef_cmd(G_GNUC_UNUSED struct mpdclient *c, command_t cmd)
{
- int length = LIST_LENGTH();
-
- if (subcmd >= 0)
- length = subcmd_length;
-
if (cmd == CMD_LIST_RANGE_SELECT)
return false;
- if (list_window_cmd(lw, length, cmd)) {
+ if (list_window_cmd(lw, cmd)) {
keydef_repaint();
return true;
}
}
} else {
if (lw->selected == 0) { /* up */
+ list_window_set_length(lw, LIST_LENGTH());
list_window_set_cursor(lw, subcmd);
subcmd = -1;
return true;
case CMD_GO_PARENT_DIRECTORY:
if (subcmd >=0) {
+ list_window_set_length(lw, LIST_LENGTH());
list_window_set_cursor(lw, subcmd);
subcmd = -1;
case CMD_LIST_RFIND:
case CMD_LIST_FIND_NEXT:
case CMD_LIST_RFIND_NEXT:
- screen_find(lw, length,
- cmd, list_callback, NULL);
+ screen_find(lw, cmd, list_callback, NULL);
keydef_repaint();
return true;