Hi.
I'm a mutt user from some years by now. Thank you very much for
developing the best mail client ever!
One feature I'd like to have is having an underline cursor. Unless I'm
missing something, mutt just knows how to draw "normal" cursor (it
highlights the whole line) and "arrow_cursor".
As mutt doesn't have this feature, I've written a very small patch
(attached) to make it work that way. This patch is really small and
don't bother to create another option. It is just for personal use.
But, as I'm using and adapting it over the years to match the last mutt
version (it patches 1.14.5 with no conflicts) I was thinking if it could
be a good feature for mutt.
If yes, so I'm going to work on this during my spare time to write a
full patch for mutt (with proper options to enable/disable feature and
with the documentation).
If no, there is no problem! I'll just keep this patch updated for my
own user. It is also published in my website for anyone interested
about.
Thanks!
--- menu.c.orig 2019-08-13 12:13:25.000000000 -0300
+++ menu.c 2019-08-13 12:19:48.000000000 -0300
@@ -276,13 +276,17 @@
ATTRSET(attr);
addch (' ');
}
- else
+ else {
+ ATTRSET(menu->color (menu->current));
+ attrset(A_UNDERLINE);
do_color = 0;
+ }
}
else if (option(OPTARROWCURSOR))
addstr(" ");
print_enriched_string (attr, (unsigned char *) buf, do_color);
+ attrset(A_NORMAL);
}
else
{
@@ -343,7 +347,10 @@
menu_pad_string (menu, buf, sizeof (buf));
SETCOLOR(MT_COLOR_INDICATOR);
mutt_window_move (menu->indexwin, menu->current + menu->offset -
menu->top, 0);
+ ATTRSET(menu->color (menu->current));
+ attrset(A_UNDERLINE);
print_enriched_string (cur_color, (unsigned char *) buf, 0);
+ attrset(A_NORMAL);
}
menu->redraw &= REDRAW_STATUS;
NORMAL_COLOR;
@@ -367,8 +374,12 @@
menu_pad_string (menu, buf, sizeof (buf));
print_enriched_string (attr, (unsigned char *) buf, 1);
}
- else
+ else {
+ ATTRSET(menu->color (menu->current));
+ attrset(A_UNDERLINE);
print_enriched_string (attr, (unsigned char *) buf, 0);
+ attrset(A_NORMAL);
+ }
menu->redraw &= REDRAW_STATUS;
NORMAL_COLOR;
}