From: Eli Zaretskii Date: Thu, 27 Jan 2022 18:35:22 +0000 (+0200) Subject: Improve detection of glyphless characters on TTY frames X-Git-Tag: emacs-29.0.90~2706 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=10c680551e899805a6de7360e9b65986fd87df72;p=emacs.git Improve detection of glyphless characters on TTY frames * src/term.c (produce_glyphs): If the terminal can report for which characters it has glyphs, use that to determine whether a given character should be displayed as glyphless. --- diff --git a/src/term.c b/src/term.c index 4c7a90a5773..ddf0e8e2f28 100644 --- a/src/term.c +++ b/src/term.c @@ -1632,9 +1632,13 @@ produce_glyphs (struct it *it) } else { - Lisp_Object charset_list = FRAME_TERMINAL (it->f)->charset_list; + struct terminal *t = FRAME_TERMINAL (it->f); + Lisp_Object charset_list = t->charset_list, char_glyph; - if (char_charset (it->char_to_display, charset_list, NULL)) + if (char_charset (it->char_to_display, charset_list, NULL) + && (char_glyph = terminal_glyph_code (t, it->char_to_display), + NILP (char_glyph) + || (FIXNUMP (char_glyph) && XFIXNUM (char_glyph) >= 0))) { it->pixel_width = CHARACTER_WIDTH (it->char_to_display); it->nglyphs = it->pixel_width;