{ "markers", MT_COLOR_MARKERS },
{ "message", MT_COLOR_MESSAGE },
{ "normal", MT_COLOR_NORMAL },
+ { "options", MT_COLOR_OPTIONS },
{ "progress", MT_COLOR_PROGRESS },
{ "prompt", MT_COLOR_PROMPT },
{ "quoted", MT_COLOR_QUOTED },
int choice;
bool redraw = true;
int prompt_lines = 1;
- char *p = NULL;
while (true)
{
mutt_menu_current_redraw();
}
+ mutt_window_move(MuttMessageWindow, 0, 0);
+
+ if ((ColorDefs[MT_COLOR_OPTIONS] != 0) &&
+ (ColorDefs[MT_COLOR_OPTIONS] != ColorDefs[MT_COLOR_PROMPT]))
+ {
+ char *cur = NULL;
+
+ while ((cur = strchr(prompt, '(')))
+ {
+ // write the part between prompt and cur using MT_COLOR_PROMPT
+ SETCOLOR(MT_COLOR_PROMPT);
+ addnstr(prompt, cur - prompt);
+
+ if (isalnum(cur[1]) && cur[2] == ')')
+ {
+ // we have a single letter within parentheses
+ SETCOLOR(MT_COLOR_OPTIONS);
+ addch(cur[1]);
+ prompt = cur + 3;
+ }
+ else
+ {
+ // we have a parenthesis followed by something else
+ addch(cur[0]);
+ prompt = cur + 1;
+ }
+ }
+ }
+
SETCOLOR(MT_COLOR_PROMPT);
- mutt_window_mvaddstr(MuttMessageWindow, 0, 0, prompt);
+ addstr(prompt);
NORMAL_COLOR;
+
mutt_window_clrtoeol(MuttMessageWindow);
}
}
else
{
- p = strchr(letters, ch.ch);
+ char *p = strchr(letters, ch.ch);
if (p)
{
choice = p - letters + 1;
MT_COLOR_COMPOSE_SECURITY_SIGN, ///< Mail will be signed
MT_COLOR_COMPOSE_SECURITY_BOTH, ///< Mail will be encrypted and signed
MT_COLOR_COMPOSE_SECURITY_NONE, ///< Mail will not be encrypted or signed
+ MT_COLOR_OPTIONS, ///< Options in prompt
MT_COLOR_MAX,
};