From: Kenichi Handa Date: Wed, 25 May 2011 01:26:35 +0000 (+0900) Subject: xdisp.c (get_next_display_element): Set correct it->face_id for a static composition. X-Git-Tag: emacs-pretest-24.0.90~104^3~41 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f16d983703a68c21ae5cf52f49d4aafa09ca31ce;p=emacs.git xdisp.c (get_next_display_element): Set correct it->face_id for a static composition. --- diff --git a/src/ChangeLog b/src/ChangeLog index 774bd4235ac..cdc8ed8999c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-05-25 Kenichi Handa + + * xdisp.c (get_next_display_element): Set correct it->face_id for + a static composition. + 2011-05-21 YAMAMOTO Mitsuharu * dispnew.c (scrolling_window): Don't exclude the case that the diff --git a/src/xdisp.c b/src/xdisp.c index 1f4c829ce94..0f21c82e1f1 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5922,9 +5922,21 @@ get_next_display_element (it) int pos = (it->s ? -1 : STRINGP (it->string) ? IT_STRING_CHARPOS (*it) : IT_CHARPOS (*it)); + int c; + + if (it->what == IT_CHARACTER) + c = it->char_to_display; + else + { + struct composition *cmp = composition_table[it->cmp_it.id]; + int i; - it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display, pos, - it->string); + c = ' '; + for (i = 0; i < cmp->glyph_len; i++) + if ((c = COMPOSITION_GLYPH (cmp, i)) != '\t') + break; + } + it->face_id = FACE_FOR_CHAR (it->f, face, c, pos, it->string); } } #endif