mutt stable branch with some hacks

Add color type for prompts.

This adds a new color type, MT_COLOR_PROMPT, that can be used to
colorize prompts (fields, yes/no, multi_choice).

Thanks to Ben Boeckel for the patch!

+12 -1
+1
color.c
··· 93 93 { "bold", MT_COLOR_BOLD }, 94 94 { "underline", MT_COLOR_UNDERLINE }, 95 95 { "index", MT_COLOR_INDEX }, 96 + { "prompt", MT_COLOR_PROMPT }, 96 97 { NULL, 0 } 97 98 }; 98 99
+1
contrib/colors.default
··· 6 6 color quoted blue white 7 7 color signature red white 8 8 color attachment red white 9 + color prompt brightmagenta white 9 10 color message brightred white 10 11 color error brightred white 11 12 color indicator brightyellow red
+1
contrib/colors.linux
··· 6 6 color quoted blue black 7 7 color signature blue black 8 8 color attachment red black 9 + color prompt brightmagenta black 9 10 color message brightred black 10 11 color error brightred black 11 12 color indicator black red
+6
curs_lib.c
··· 139 139 do 140 140 { 141 141 CLEARLINE (LINES-1); 142 + SETCOLOR (MT_COLOR_PROMPT); 142 143 addstr ((char *)field); /* cast to get around bad prototypes */ 144 + NORMAL_COLOR; 143 145 mutt_refresh (); 144 146 getyx (stdscr, y, x); 145 147 ret = _mutt_enter_string (buf, buflen, y, x, complete, multiple, files, numfiles, es); ··· 225 227 answer_string_len = mutt_strwidth (answer_string); 226 228 /* maxlen here is sort of arbitrary, so pick a reasonable upper bound */ 227 229 msglen = mutt_wstr_trunc (msg, 4*COLS, COLS - answer_string_len, NULL); 230 + SETCOLOR (MT_COLOR_PROMPT); 228 231 addnstr (msg, msglen); 229 232 addstr (answer_string); 233 + NORMAL_COLOR; 230 234 FREE (&answer_string); 231 235 232 236 FOREVER ··· 647 651 int choice; 648 652 char *p; 649 653 654 + SETCOLOR (MT_COLOR_PROMPT); 650 655 mvaddstr (LINES - 1, 0, prompt); 656 + NORMAL_COLOR; 651 657 clrtoeol (); 652 658 FOREVER 653 659 {
+1
doc/manual.xml.head
··· 2644 2644 <listitem><para>markers (the <quote>+</quote> markers at the beginning of wrapped lines in the pager)</para></listitem> 2645 2645 <listitem><para>message (informational messages)</para></listitem> 2646 2646 <listitem><para>normal</para></listitem> 2647 + <listitem><para>prompt</para></listitem> 2647 2648 <listitem><para>quoted (text matching <link linkend="quote-regexp">$quote_regexp</link> in the body of a message)</para></listitem> 2648 2649 <listitem><para>quoted1, quoted2, ..., quoted<emphasis>N</emphasis> (higher levels of quoting)</para></listitem> 2649 2650 <listitem><para>search (highlighting of words in the pager)</para></listitem>
+1 -1
doc/muttrc.man.head
··· 233 233 .BR hdrdefault ", " index ", " indicator ", " markers ", " 234 234 .BR message ", " normal ", " quoted ", " quoted\fIN\fP ", " 235 235 .BR search ", " signature ", " status ", " tilde ", " tree ", " 236 - .BR underline . 236 + .BR underline ", " prompt . 237 237 The 238 238 .BR body " and " header 239 239 objects allow you to restrict the colorization to a regular
+1
mutt_curses.h
··· 120 120 MT_COLOR_BOLD, 121 121 MT_COLOR_UNDERLINE, 122 122 MT_COLOR_INDEX, 123 + MT_COLOR_PROMPT, 123 124 MT_COLOR_MAX 124 125 }; 125 126