From: Jeffrey Middleton Date: Mon, 23 Mar 2009 14:59:10 +0000 (-0500) Subject: screen_keydef: parent directory command X-Git-Tag: release-0.14~57 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8cd063a19d56b3e11776451fac62fd74edec2c9b;p=ncmpc.git screen_keydef: parent directory command Allow CMD_GO_PARENT_DIRECTORY on the keydef screen (for returning from subcmd to command list). --- diff --git a/src/screen_keydef.c b/src/screen_keydef.c index 1ffee6b..2cec0f4 100644 --- a/src/screen_keydef.c +++ b/src/screen_keydef.c @@ -339,6 +339,16 @@ keydef_cmd(G_GNUC_UNUSED mpdclient_t *c, command_t cmd) lw->selected - STATIC_SUB_ITEMS); } return true; + case CMD_GO_PARENT_DIRECTORY: + if (subcmd >=0) { + lw->selected = subcmd; + lw->selected_start = lw->selected; + lw->selected_end = lw->selected; + subcmd = -1; + + keydef_repaint(); + } + break; case CMD_DELETE: if (subcmd >= 0 && lw->selected >= STATIC_SUB_ITEMS) delete_key(subcmd, lw->selected - STATIC_SUB_ITEMS);