From 62af9c24210d3b1d2e2cd8e122ef54ef577b0219 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 19 Apr 2005 10:11:41 +0000 Subject: [PATCH] (handle_stop): Set saved_face_id to current face if selective_display_ellipsis_p so ellipsis will be shown in same face as preceding text. (setup_for_ellipsis): Don't set saved_face_id here. (next_element_from_display_vector): Default to saved_face_id. --- src/xdisp.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/xdisp.c b/src/xdisp.c index 4f3c5b1c565..b7b27515cd3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -2706,6 +2706,10 @@ handle_stop (it) it->dpvec = NULL; it->current.dpvec_index = -1; + /* Use face of preceding text for ellipsis (if invisible) */ + if (it->selective_display_ellipsis_p) + it->saved_face_id = it->face_id; + do { handled = HANDLED_NORMALLY; @@ -3382,9 +3386,12 @@ setup_for_ellipsis (it, len) it->current.dpvec_index = 0; it->dpvec_face_id = -1; +#if 0 /* Already saved in handle_stop */ /* Remember the current face id in case glyphs specify faces. IT's face is restored in set_iterator_to_next. */ it->saved_face_id = it->face_id; +#endif + it->method = GET_FROM_DISPLAY_VECTOR; it->ellipsis_p = 1; } @@ -5423,6 +5430,8 @@ next_element_from_display_vector (it) /* Precondition. */ xassert (it->dpvec && it->current.dpvec_index >= 0); + it->face_id = it->saved_face_id; + if (INTEGERP (*it->dpvec) && GLYPH_CHAR_VALID_P (XFASTINT (*it->dpvec))) { -- 2.39.2