diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-04-27 12:37:32 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-04-27 12:37:32 +0000 |
commit | 37526b42c1042b0b6193462c5a79aee0d0ce80a7 (patch) | |
tree | 37173532ca793388e743d2a5031c3302ed2c76a7 /src/term.c | |
parent | 405d5e634872f112bb169af6beb2bb6857b6c235 (diff) | |
download | emacs-37526b42c1042b0b6193462c5a79aee0d0ce80a7.tar.gz |
(turn_on_face): Fix reverse video handling on terminals
that don't support colors.
Diffstat (limited to 'src/term.c')
-rw-r--r-- | src/term.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/term.c b/src/term.c index a3a3ce9f93a..4bd5f1617c7 100644 --- a/src/term.c +++ b/src/term.c @@ -1,5 +1,5 @@ /* terminal control module for terminals described by TERMCAP - Copyright (C) 1985, 86, 87, 93, 94, 95, 98 + Copyright (C) 1985, 86, 87, 93, 94, 95, 98, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -2052,8 +2052,18 @@ turn_on_face (f, face_id) { /* If we can't display colors, use reverse video if the face specifies that. */ - if (face->tty_reverse_p) - toggle_highlight (); + if (inverse_video) + { + if (fg == FACE_TTY_DEFAULT_FG_COLOR + || bg == FACE_TTY_DEFAULT_BG_COLOR) + toggle_highlight (); + } + else + { + if (fg == FACE_TTY_DEFAULT_BG_COLOR + || bg == FACE_TTY_DEFAULT_FG_COLOR) + toggle_highlight (); + } } } |