From d79e5a8917cc6c95a6447348b590c05df7d6a0e7 Mon Sep 17 00:00:00 2001 From: cohrs Date: Sun, 21 Apr 2002 19:01:57 +0000 Subject: [PATCH] R812 - tty color/inverse video interaction With some TERMs, disabling inverse video also disables color. Work around: explicitly turn off color when turning off inverse video. --- doc/fixes34.1 | 1 + win/tty/wintty.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index b10f28493..fede05675 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -108,6 +108,7 @@ tty: clear topl after pickup_burden prompt Gnome: destroy main game windows correctly Gnome: Dylan Alex Simon's port of KDE-style worn window Gnome: Dylan Alex Simon's port of KDE-style hero cursor color +tty: support terms where turning off inverse video turns off color too General New Features diff --git a/win/tty/wintty.c b/win/tty/wintty.c index a9c356f67..d550e0b1d 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -2436,8 +2436,14 @@ tty_print_glyph(window, x, y, glyph) #endif g_putch(ch); /* print the character */ - if (reverse_on) + if (reverse_on) { term_end_attr(ATR_INVERSE); + /* turn off color as well, ATR_INVERSE may have done this already */ + if(ttyDisplay->color != NO_COLOR) { + term_end_color(); + ttyDisplay->color = NO_COLOR; + } + } wins[window]->curx++; /* one character over */ ttyDisplay->curx++; /* the real cursor moved too */ -- 2.40.0