# HG changeset patch # User Gerd Moellmann # Date 976052136 0 # Node ID b5cdf1bb6bb809e716ad6f606dcca0ed70b690a1 # Parent 5a5d98ee407834be9087675abb4f31264f8f5b8e (next_element_from_ellipsis): Save face before selective display in saved_face_id, and set face_before_selective_p. (reseat_1): Reset face_before_selective_p. (append_space, extend_face_to_end_of_line): If iterator's face_before_selective_p is set, use the face from saved_face_id. (extend_face_to_end_of_line): For tty frames, make sure to use the right face id when producing spaces at the end of the line. diff -r 5a5d98ee4078 -r b5cdf1bb6bb8 src/xdisp.c --- a/src/xdisp.c Tue Dec 05 20:36:44 2000 +0000 +++ b/src/xdisp.c Tue Dec 05 21:35:36 2000 +0000 @@ -3647,6 +3647,7 @@ it->string = Qnil; it->method = next_element_from_buffer; it->sp = 0; + it->face_before_selective_p = 0; if (set_stop_p) it->stop_charpos = CHARPOS (pos); @@ -4303,8 +4304,14 @@ } else { + /* The face at the current position may be different from the + face we find after the invisible text. Remember what it + was in IT->saved_face_id, and signal that it's there by + setting face_before_selective_p. */ + it->saved_face_id = it->face_id; it->method = next_element_from_buffer; reseat_at_next_visible_line_start (it, 1); + it->face_before_selective_p = 1; } return get_next_display_element (it); @@ -11702,6 +11709,8 @@ if (default_face_p) it->face_id = DEFAULT_FACE_ID; + else if (it->face_before_selective_p) + it->face_id = it->saved_face_id; face = FACE_FROM_ID (it->f, it->face_id); it->face_id = FACE_FOR_CHAR (it->f, face, 0); @@ -11740,8 +11749,12 @@ /* Face extension extends the background and box of IT->face_id to the end of the line. If the background equals the background - of the frame, we haven't to do anything. */ - face = FACE_FROM_ID (f, it->face_id); + of the frame, we don't have to do anything. */ + if (it->face_before_selective_p) + face = FACE_FROM_ID (it->f, it->saved_face_id); + else + face = FACE_FROM_ID (f, it->face_id); + if (FRAME_WINDOW_P (f) && face->box == FACE_NO_BOX && face->background == FRAME_BACKGROUND_PIXEL (f) @@ -11779,6 +11792,7 @@ struct text_pos saved_pos; Lisp_Object saved_object; int saved_what = it->what; + int saved_face_id = it->face_id; saved_object = it->object; saved_pos = it->position; @@ -11788,6 +11802,7 @@ it->object = make_number (0); it->c = ' '; it->len = 1; + it->face_id = face->id; PRODUCE_GLYPHS (it); @@ -11800,6 +11815,7 @@ it->object = saved_object; it->position = saved_pos; it->what = saved_what; + it->face_id = saved_face_id; } }