summaryrefslogtreecommitdiffstats
path: root/menu.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2020-07-22 18:46:51 -0700
committerKevin McCarthy <kevin@8t8.us>2020-07-22 18:46:51 -0700
commit3c2501e50c5be252802f9c529a28685bfbf8a4d0 (patch)
treeae2ca8e5178a3f2f53eb989ab79fcc4e6d2ccc06 /menu.c
parent12ff55e276a52aaced76a5d9f08d7613416f0dcc (diff)
Fix redraw_motion() redraw bug.
Commit e2a28006 moved the cur_color assignment so that $arrow_cursor could also use the value for overlays. Unfortunately, it at the same time moved the call *after* the call to mutt_window_move(), which would introduce a drawing bug if menu->color() went across IMAP. The previous commit removed overlays for $arrow_cursor, also removing the need for cur_color to be assigned for both. Move it back to where it was before.
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/menu.c b/menu.c
index 44c2beb9..a7fff292 100644
--- a/menu.c
+++ b/menu.c
@@ -335,8 +335,6 @@ void menu_redraw_motion (MUTTMENU *menu)
old_color = menu->color (menu->oldcurrent);
mutt_window_move (menu->indexwin, menu->oldcurrent + menu->offset - menu->top, 0);
- cur_color = menu->color (menu->current);
-
if (option (OPTARROWCURSOR))
{
/* clear the pointer */
@@ -363,6 +361,7 @@ void menu_redraw_motion (MUTTMENU *menu)
print_enriched_string (old_color, (unsigned char *) buf, 0);
/* now draw the new one to reflect the change */
+ cur_color = menu->color (menu->current);
menu_make_entry (buf, sizeof (buf), menu, menu->current);
menu_pad_string (menu, buf, sizeof (buf));
mutt_window_move (menu->indexwin, menu->current + menu->offset - menu->top, 0);