diff options
| author | Eli Zaretskii | 2026-04-04 18:22:05 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2026-04-04 18:22:05 +0300 |
| commit | 01a9d78a7e4c7d7fa5b799e4fdc2caf77a012734 (patch) | |
| tree | 7cb29f247d6b4921a9aacef8b5e8651fee9c4036 /src | |
| parent | 524e8b007c49221e253a2a54971a3c988d662ea6 (diff) | |
| download | emacs-01a9d78a7e4c7d7fa5b799e4fdc2caf77a012734.tar.gz emacs-01a9d78a7e4c7d7fa5b799e4fdc2caf77a012734.zip | |
Fix use of special glyphs with faces from display-table
* src/xdisp.c (produce_special_glyphs): Fix the case where the
display-table specifies a face for truncation/continuation glyphs.
(Bug#80693)
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 4f2c5c39900..bd07f9983ff 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -32842,6 +32842,8 @@ produce_special_glyphs (struct it *it, enum display_element_type what, | |||
| 32842 | /* Mirror for R2L. */ | 32842 | /* Mirror for R2L. */ |
| 32843 | if (direction == R2L) | 32843 | if (direction == R2L) |
| 32844 | { | 32844 | { |
| 32845 | face_id = GLYPH_CODE_FACE (gc); | ||
| 32846 | |||
| 32845 | /* Try bidi mirroring first. */ | 32847 | /* Try bidi mirroring first. */ |
| 32846 | int c = bidi_mirror_char (GLYPH_CODE_CHAR (gc)); | 32848 | int c = bidi_mirror_char (GLYPH_CODE_CHAR (gc)); |
| 32847 | 32849 | ||
| @@ -32861,10 +32863,17 @@ produce_special_glyphs (struct it *it, enum display_element_type what, | |||
| 32861 | else | 32863 | else |
| 32862 | SET_GLYPH (glyph, '/', face_id); | 32864 | SET_GLYPH (glyph, '/', face_id); |
| 32863 | } | 32865 | } |
| 32866 | else | ||
| 32867 | SET_GLYPH_FROM_GLYPH_CODE (glyph, gc); | ||
| 32864 | } | 32868 | } |
| 32865 | else | 32869 | else |
| 32870 | { | ||
| 32871 | struct face *face = FACE_FROM_ID (it->f, face_id); | ||
| 32872 | int id = FACE_FOR_CHAR (it->f, face, c, -1, Qnil); | ||
| 32873 | |||
| 32866 | /* Bidi mirroring. */ | 32874 | /* Bidi mirroring. */ |
| 32867 | SET_GLYPH (glyph, c, face_id); | 32875 | SET_GLYPH (glyph, c, id); |
| 32876 | } | ||
| 32868 | } | 32877 | } |
| 32869 | else | 32878 | else |
| 32870 | /* No mirroring. */ | 32879 | /* No mirroring. */ |
| @@ -32903,6 +32912,8 @@ produce_special_glyphs (struct it *it, enum display_element_type what, | |||
| 32903 | if (((it->bidi_it.paragraph_dir == R2L) && !left_edge_p) || | 32912 | if (((it->bidi_it.paragraph_dir == R2L) && !left_edge_p) || |
| 32904 | ((it->bidi_it.paragraph_dir == L2R) && left_edge_p)) | 32913 | ((it->bidi_it.paragraph_dir == L2R) && left_edge_p)) |
| 32905 | { | 32914 | { |
| 32915 | face_id = GLYPH_CODE_FACE (gc); | ||
| 32916 | |||
| 32906 | /* Try bidi mirroring first. */ | 32917 | /* Try bidi mirroring first. */ |
| 32907 | int c = bidi_mirror_char (GLYPH_CODE_CHAR (gc)); | 32918 | int c = bidi_mirror_char (GLYPH_CODE_CHAR (gc)); |
| 32908 | 32919 | ||
| @@ -32922,6 +32933,8 @@ produce_special_glyphs (struct it *it, enum display_element_type what, | |||
| 32922 | else | 32933 | else |
| 32923 | SET_GLYPH (glyph, '$', face_id); | 32934 | SET_GLYPH (glyph, '$', face_id); |
| 32924 | } | 32935 | } |
| 32936 | else | ||
| 32937 | SET_GLYPH_FROM_GLYPH_CODE (glyph, gc); | ||
| 32925 | } | 32938 | } |
| 32926 | else | 32939 | else |
| 32927 | { | 32940 | { |