diff options
| author | Gerd Moellmann | 2001-04-27 12:37:32 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-04-27 12:37:32 +0000 |
| commit | 37526b42c1042b0b6193462c5a79aee0d0ce80a7 (patch) | |
| tree | 37173532ca793388e743d2a5031c3302ed2c76a7 /src | |
| parent | 405d5e634872f112bb169af6beb2bb6857b6c235 (diff) | |
| download | emacs-37526b42c1042b0b6193462c5a79aee0d0ce80a7.tar.gz emacs-37526b42c1042b0b6193462c5a79aee0d0ce80a7.zip | |
(turn_on_face): Fix reverse video handling on terminals
that don't support colors.
Diffstat (limited to 'src')
| -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 @@ | |||
| 1 | /* terminal control module for terminals described by TERMCAP | 1 | /* terminal control module for terminals described by TERMCAP |
| 2 | Copyright (C) 1985, 86, 87, 93, 94, 95, 98 | 2 | Copyright (C) 1985, 86, 87, 93, 94, 95, 98, 2000, 2001 |
| 3 | Free Software Foundation, Inc. | 3 | Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -2052,8 +2052,18 @@ turn_on_face (f, face_id) | |||
| 2052 | { | 2052 | { |
| 2053 | /* If we can't display colors, use reverse video | 2053 | /* If we can't display colors, use reverse video |
| 2054 | if the face specifies that. */ | 2054 | if the face specifies that. */ |
| 2055 | if (face->tty_reverse_p) | 2055 | if (inverse_video) |
| 2056 | toggle_highlight (); | 2056 | { |
| 2057 | if (fg == FACE_TTY_DEFAULT_FG_COLOR | ||
| 2058 | || bg == FACE_TTY_DEFAULT_BG_COLOR) | ||
| 2059 | toggle_highlight (); | ||
| 2060 | } | ||
| 2061 | else | ||
| 2062 | { | ||
| 2063 | if (fg == FACE_TTY_DEFAULT_BG_COLOR | ||
| 2064 | || bg == FACE_TTY_DEFAULT_FG_COLOR) | ||
| 2065 | toggle_highlight (); | ||
| 2066 | } | ||
| 2057 | } | 2067 | } |
| 2058 | } | 2068 | } |
| 2059 | 2069 | ||