Mercurial > emacs
changeset 34225:b5cdf1bb6bb8
(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.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 05 Dec 2000 21:35:36 +0000 |
parents | 5a5d98ee4078 |
children | 2e38b27fd38b |
files | src/xdisp.c |
diffstat | 1 files changed, 18 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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; } }