Get defaults the right way round.

This commit is contained in:
Nicholas Marriott 2008-09-08 21:04:59 +00:00
parent 0ba3bab997
commit affc3c95c3
1 changed files with 3 additions and 3 deletions

6
tty.c
View File

@ -1,4 +1,4 @@
/* $Id: tty.c,v 1.38 2008-09-08 17:40:51 nicm Exp $ */
/* $Id: tty.c,v 1.39 2008-09-08 21:04:59 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -648,7 +648,7 @@ tty_attributes(struct tty *tty, u_char attr, u_char fg, u_char bg)
} else {
if (fg > 7)
fg = 8;
if (fg == 8 && tty->term->flags & TERM_HASDEFAULTS)
if (fg == 8 && !(tty->term->flags & TERM_HASDEFAULTS))
fg = 7;
if (fg == 8)
tty_puts(tty, "\033[39m");
@ -664,7 +664,7 @@ tty_attributes(struct tty *tty, u_char attr, u_char fg, u_char bg)
} else {
if (bg > 7)
bg = 8;
if (bg == 8 && tty->term->flags & TERM_HASDEFAULTS)
if (bg == 8 && !(tty->term->flags & TERM_HASDEFAULTS))
bg = 0;
if (bg == 8)
tty_puts(tty, "\033[49m");