A recent patch 634f4928 introduced new tty behavior,

where calling term_start_color(NO_COLOR) would have the same
effect as calling term_end_color().

That change only included a change for termcap, but not any of
the NO_TERMS configurations. (NO_TERMS is defined for an
implementation where termcap is not used).

This attempts to make sys/msdos/video.c and sys/windows/consoletty.c
honor the change.

The msdos change has not yet been tested.

No attempt was made to alter the term_start_color() implementations
within the outdated tree.
This commit is contained in:
nhmall
2023-12-07 09:34:05 -05:00
parent 5c5a5cf2cc
commit e639c4bdaa
2 changed files with 8 additions and 3 deletions
+4 -1
View File
@@ -354,7 +354,10 @@ term_start_color(int color)
if (monoflag) {
g_attribute = attrib_text_normal;
} else {
if (color >= 0 && color < CLR_MAX) {
if (color == NO_COLOR) { /* 3.7 behave like term_end_color() */
g_attribute = iflags.grmode ? attrib_gr_normal : attrib_text_normal;
curframecolor = NO_COLOR;
} else if (color >= 0 && color < CLR_MAX) {
if (iflags.grmode)
g_attribute = color;
else