diff options
author | ache <ache@FreeBSD.org> | 1994-12-02 19:43:34 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-12-02 19:43:34 +0000 |
commit | 7ac6d5a8b5b268cdac980543d73846022972f292 (patch) | |
tree | 8cf08bf2cc045a4c4b87eaab8fdf51bfe023d764 /lib/libncurses/lib_bkgd.c | |
parent | 5a68a901c1fecf5ceb5378e5a0db9e62b13af990 (diff) | |
download | FreeBSD-src-7ac6d5a8b5b268cdac980543d73846022972f292.zip FreeBSD-src-7ac6d5a8b5b268cdac980543d73846022972f292.tar.gz |
bkgd() family fixes
Diffstat (limited to 'lib/libncurses/lib_bkgd.c')
-rw-r--r-- | lib/libncurses/lib_bkgd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libncurses/lib_bkgd.c b/lib/libncurses/lib_bkgd.c index 0210995..f54e4d1 100644 --- a/lib/libncurses/lib_bkgd.c +++ b/lib/libncurses/lib_bkgd.c @@ -27,10 +27,13 @@ int x, y; T(("wbkgd(%x, %x) called", win, ch)); for (y = 0; y < win->_maxy; y++) for (x = 0; x < win->_maxx; x++) - if (win->_line[y][x]&A_CHARTEXT == ' ') - win->_line[y][x] |= ch; + /* Don't attempt to replace existing attrs */ + if ((win->_line[y][x]&A_ATTRIBUTES) == A_NORMAL) { + if (win->_line[y][x] == ' ') + win->_line[y][x] = ch; else win->_line[y][x] |= (ch&A_ATTRIBUTES); + } touchwin(win); return OK; } |