`SETCOLOR(MT_COLOR_NORMAL)` caused identical code to be generated in
both branches of an `if` statement.
{
addch(' ');
}
- SETCOLOR(MT_COLOR_NORMAL);
+ NORMAL_COLOR;
}
else
{
SETCOLOR(MT_COLOR_PROGRESS);
addstr(buf2);
buf2[off] = ch;
- SETCOLOR(MT_COLOR_NORMAL);
+ NORMAL_COLOR;
addstr(&buf2[off]);
}
}
if (!option(OPT_NO_CURSES))
{
- SETCOLOR(MT_COLOR_NORMAL);
+ NORMAL_COLOR;
clear();
mutt_error = mutt_curses_error;
mutt_message = mutt_curses_message;
#endif
/* reset the color to the normal terminal color as defined by 'color normal ...' */
-#define NORMAL_COLOR SETCOLOR(MT_COLOR_NORMAL)
+#ifdef HAVE_BKGDSET
+#define NORMAL_COLOR bkgdset(ColorDefs[MT_COLOR_NORMAL] | ' ')
+#else
+#define NORMAL_COLOR attrset(ColorDefs[MT_COLOR_NORMAL])
+#endif
#endif /* _MUTT_CURSES_H */
static void fill_empty_space(int first_row, int num_rows, int div_width, int num_cols)
{
/* Fill the remaining rows with blank space */
- SETCOLOR(MT_COLOR_NORMAL);
+ NORMAL_COLOR;
if (!option(OPT_SIDEBAR_ON_RIGHT))
div_width = 0;
if (ColorDefs[MT_COLOR_ORDINARY] != 0)
SETCOLOR(MT_COLOR_ORDINARY);
else
- SETCOLOR(MT_COLOR_NORMAL);
+ NORMAL_COLOR;
}
int col = 0;