aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2016-01-08 12:12:53 +0200
committerEli Zaretskii2016-01-08 12:12:53 +0200
commite990bb270e574eb6d329056e28be9340d9a042ef (patch)
tree91ddd4f94f35be86b8cde4be367b13092338011c
parent5810ac3a105a13224b84c848ccf5fd2ac9bbb712 (diff)
downloademacs-e990bb270e574eb6d329056e28be9340d9a042ef.tar.gz
emacs-e990bb270e574eb6d329056e28be9340d9a042ef.zip
Use the face of preceding text for displaying the ellipsis
* src/xdisp.c (setup_for_ellipsis): Use the face of the preceding text in it->saved_face_id for displaying the ellipsis, and ignore the face, if any, of the invisible text. (Bug#22320)
-rw-r--r--src/xdisp.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 87a92fce0f0..d730a0bf1b6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4583,14 +4583,15 @@ setup_for_ellipsis (struct it *it, int len)
4583 it->current.dpvec_index = 0; 4583 it->current.dpvec_index = 0;
4584 it->dpvec_face_id = -1; 4584 it->dpvec_face_id = -1;
4585 4585
4586 /* Reset the current face ID to default if the last visible 4586 /* Use IT->saved_face_id for the ellipsis, so that it has the same
4587 character and the first invisible character have different faces. 4587 face as the preceding text. IT->saved_face_id was set in
4588 IT->saved_face_id was set in handle_stop to the face of the 4588 handle_stop to the face of the preceding character, and will be
4589 preceding character, and will be different from IT->face_id only 4589 different from IT->face_id only if the invisible text skipped in
4590 if the invisible text skipped in handle_invisible_prop has some 4590 handle_invisible_prop has some non-default face on its first
4591 non-default face. IT's face is restored in set_iterator_to_next. */ 4591 character. We thus ignore the face of the invisible text when we
4592 if (it->saved_face_id < 0 || it->saved_face_id != it->face_id) 4592 display the ellipsis. IT's face is restored in set_iterator_to_next. */
4593 it->saved_face_id = it->face_id = DEFAULT_FACE_ID; 4593 if (it->saved_face_id >= 0)
4594 it->face_id = it->saved_face_id;
4594 4595
4595 /* If the ellipsis represents buffer text, it means we advanced in 4596 /* If the ellipsis represents buffer text, it means we advanced in
4596 the buffer, so we should no longer ignore overlay strings. */ 4597 the buffer, so we should no longer ignore overlay strings. */