Color check for 256 and 24 bit color output with enhanced symbols

Adding a check for using the 256 or 24 bit color escape sequnces only if
the terminal supports it.
This commit is contained in:
Patric Mueller
2022-06-13 20:35:40 +02:00
parent 1685b5e16b
commit 193d0c4332

View File

@@ -3554,6 +3554,7 @@ tty_print_glyph(winid window, xchar x, xchar y,
#ifdef ENHANCED_SYMBOLS
/* we don't link with termcap.o if NO_TERMS is defined */
if ((tty_procs.wincap2 & WC2_U_24BITCOLOR) && SYMHANDLING(H_UTF8)
&& iflags.colorcount >= 256
&& glyphinfo->gm.u && glyphinfo->gm.u->ucolor) {
term_start_24bitcolor(glyphinfo->gm.u);
color24bit_on = TRUE;