On Thu, Jul 23, 2020 at 02:10:50AM +0300, Maxim Tarasov wrote:
One suggestion might be to remove the mutt_attrset_cursor() calls before print_enriched_string(,,1). And inside print_enriched_string() instead:We can even go a step further an use this ATTRSET (base_color) inside print_enriched_string() unconditionally. Then top-level ATTRSET in both menu_redraw_index() and menu_redraw_motion() can be moved to cover only $arrow_cursor portion. This way menu_redraw_index() takes care of its own coloring without relying on the right color being set outside.
Thank you Maxim. This looks great! I will commit it shortly.The only thing that needs fixing was a bug I missed in commit e2a28006. I failed to notice you moved a menu->color() call inside menu_redraw_motion(). Note the comment in that function about calls to menu->color() needing to be made before mutt_window_move() because of IMAP messages that could relocate the cursor.
I will add a fix for that in a separate commit.Also, again, it would save me some work if you included a full git commit - with commit message, in the future.
-- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
Description: PGP signature
