diff options
Diffstat (limited to 'lib/libncurses/lib_addch.c')
-rw-r--r-- | lib/libncurses/lib_addch.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libncurses/lib_addch.c b/lib/libncurses/lib_addch.c index 00684ed..5ec6576 100644 --- a/lib/libncurses/lib_addch.c +++ b/lib/libncurses/lib_addch.c @@ -56,10 +56,14 @@ chtype ch = c; T(("win attr = %x", win->_attrs)); ch |= win->_attrs; - if (win->_line[y][x]&A_CHARTEXT == ' ') - ch |= win->_bkgd; + /* Don't attempt to replace any given attributes */ + if ((ch&A_ATTRIBUTES) == A_NORMAL) { + if (ch == ' ') + ch = win->_bkgd; else ch |= (win->_bkgd&A_ATTRIBUTES); + } + T(("bkg = %x -> ch = %x", win->_bkgd, ch)); if (win->_line[y][x] != ch) { |