From 2e7062a1d16477099c9f05a69ef971449700b790 Mon Sep 17 00:00:00 2001 From: Jeffrey Middleton Date: Thu, 5 Mar 2009 19:02:07 -0600 Subject: [PATCH] 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. --- src/screen_keydef.c | 4 ++++ 1 file changed, 4 insertions(+) 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(); -- 2.30.2