From: Jeffrey Middleton Date: Fri, 6 Mar 2009 01:02:07 +0000 (-0600) Subject: screen_keydef: Fixed selections on key bindings screen X-Git-Tag: release-0.14~75 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2e7062a1d16477099c9f05a69ef971449700b790;p=ncmpc.git screen_keydef: Fixed selections on key bindings screen Key bindings screen uses struct list_window, so the addition of visual mode requires setting selection_start and selection_end to match selection, even though visual mode serves no purpose there currently. --- diff --git a/src/screen_keydef.c b/src/screen_keydef.c index 9283799..d5f12f8 100644 --- a/src/screen_keydef.c +++ b/src/screen_keydef.c @@ -316,6 +316,8 @@ keydef_cmd(G_GNUC_UNUSED mpdclient_t *c, command_t cmd) } else { subcmd = lw->selected; lw->selected=0; + lw->selected_start = lw->selected; + lw->selected_end = lw->selected; check_subcmd_length(); keydef_repaint(); @@ -323,6 +325,8 @@ keydef_cmd(G_GNUC_UNUSED mpdclient_t *c, command_t cmd) } else { if (lw->selected == 0) { /* up */ lw->selected = subcmd; + lw->selected_start = lw->selected; + lw->selected_end = lw->selected; subcmd = -1; keydef_repaint();