summaryrefslogtreecommitdiffstats
path: root/mbbsd/pfterm.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-29 11:43:44 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-29 11:43:44 +0800
commit62fa511feb6201089e62e680172cf18ae7fae73d (patch)
treec541db05c237f979a01122b641c724df00ecf300 /mbbsd/pfterm.c
parent355996889f971d3431cba4cd206c49937854a7a9 (diff)
downloadpttbbs-62fa511feb6201089e62e680172cf18ae7fae73d.tar
pttbbs-62fa511feb6201089e62e680172cf18ae7fae73d.tar.gz
pttbbs-62fa511feb6201089e62e680172cf18ae7fae73d.tar.bz2
pttbbs-62fa511feb6201089e62e680172cf18ae7fae73d.tar.lz
pttbbs-62fa511feb6201089e62e680172cf18ae7fae73d.tar.xz
pttbbs-62fa511feb6201089e62e680172cf18ae7fae73d.tar.zst
pttbbs-62fa511feb6201089e62e680172cf18ae7fae73d.zip
- pfterm: prefer "reset" better than "change bg attr to black".
- pfterm: add compatablity document git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3755 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/pfterm.c')
-rw-r--r--mbbsd/pfterm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mbbsd/pfterm.c b/mbbsd/pfterm.c
index 9360acc4..14c15e67 100644
--- a/mbbsd/pfterm.c
+++ b/mbbsd/pfterm.c
@@ -1493,8 +1493,15 @@ fterm_chattr(char *s, ftattr oattr, ftattr nattr)
obold = (oattr & FTATTR_BOLD) ? 1 : 0;
oblink = (oattr & FTATTR_BLINK)? 1 : 0;
+ // we dont use "disable blink/bold" commands,
+ // so if these settings are changed then we must reset.
+ // another case is changing background to default background -
+ // better use "RESET" to override it.
+ // Possible optimization: when blink/bold on, don't RESET
+ // for background change?
if ((oblink != blink && !blink) ||
- (obold != bold && !bold) )
+ (obold != bold && !bold) ||
+ (bg == FTATTR_DEFAULT_FG && obg != bg) )
{
if (lead) lead = 0; else *s++ = ';';
*s++ = '0';