]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_addch.c
ncurses 5.6 - patch 20080322
[ncurses.git] / ncurses / base / lib_addch.c
index 1ef6cc5803d3f3dca39cd370d1faad2c57e00fcb..489dd23e887d3582be7ac40742460419a21a8090 100644 (file)
@@ -36,7 +36,7 @@
 #include <curses.priv.h>
 #include <ctype.h>
 
 #include <curses.priv.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_addch.c,v 1.108 2008/02/03 18:50:27 tom Exp $")
+MODULE_ID("$Id: lib_addch.c,v 1.110 2008/03/22 23:18:28 tom Exp $")
 
 static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
 
 
 static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
 
@@ -217,7 +217,9 @@ _nc_build_wch(WINDOW *win, ARG_CH_T ch)
                       buffer,
                       WINDOW_EXT(win, addch_used), &state)) > 0) {
        attr_t attrs = AttrOf(CHDEREF(ch));
                       buffer,
                       WINDOW_EXT(win, addch_used), &state)) > 0) {
        attr_t attrs = AttrOf(CHDEREF(ch));
+       int pair = GetPair(CHDEREF(ch));
        SetChar(CHDEREF(ch), result, attrs);
        SetChar(CHDEREF(ch), result, attrs);
+       if_EXT_COLORS(SetPair(CHDEREF(ch), pair));
        WINDOW_EXT(win, addch_used) = 0;
     } else if (len == -1) {
        /*
        WINDOW_EXT(win, addch_used) = 0;
     } else if (len == -1) {
        /*
@@ -474,6 +476,7 @@ waddch_nosync(WINDOW *win, const NCURSES_CH_T ch)
        while (*s) {
            NCURSES_CH_T sch;
            SetChar(sch, *s++, AttrOf(ch));
        while (*s) {
            NCURSES_CH_T sch;
            SetChar(sch, *s++, AttrOf(ch));
+           if_EXT_COLORS(SetPair(sch, GetPair(ch)));
            if (waddch_literal(win, sch) == ERR)
                return ERR;
        }
            if (waddch_literal(win, sch) == ERR)
                return ERR;
        }