X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_color.c;h=38507af30f8e91942ea2ea9fd7c04d74a8c8e25b;hp=72a2a4857559dee5e11878f850dea736d3937540;hb=07e31b3b587a07281ff7c71e5c13248a31048257;hpb=ed646e3f683083e787c6ba773364401dc9fa9d40 diff --git a/ncurses/base/lib_color.c b/ncurses/base/lib_color.c index 72a2a485..38507af3 100644 --- a/ncurses/base/lib_color.c +++ b/ncurses/base/lib_color.c @@ -48,7 +48,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_color.c,v 1.116 2017/03/25 21:10:54 tom Exp $") +MODULE_ID("$Id: lib_color.c,v 1.117 2017/05/07 20:46:03 tom Exp $") #ifdef USE_TERM_DRIVER #define CanChange InfoOf(SP_PARM).canchange @@ -538,8 +538,8 @@ _nc_init_pair(SCREEN *sp, int pair, int f, int b) * pair colors with the new ones). */ MakeColorPair(result, f, b); - if (FORE_OF(previous) != 0 - && BACK_OF(previous) != 0 + if ((FORE_OF(previous) != 0 + || BACK_OF(previous) != 0) && !isSamePair(previous, result)) { _nc_change_pair(sp, pair); }