emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 e990bb2: Use the face of preceding text for displ


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-25 e990bb2: Use the face of preceding text for displaying the ellipsis
Date: Fri, 08 Jan 2016 10:19:48 +0000

branch: emacs-25
commit e990bb270e574eb6d329056e28be9340d9a042ef
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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)
---
 src/xdisp.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 87a92fc..d730a0b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4583,14 +4583,15 @@ setup_for_ellipsis (struct it *it, int len)
   it->current.dpvec_index = 0;
   it->dpvec_face_id = -1;
 
-  /* Reset the current face ID to default if the last visible
-     character and the first invisible character have different faces.
-     IT->saved_face_id was set in handle_stop to the face of the
-     preceding character, and will be different from IT->face_id only
-     if the invisible text skipped in handle_invisible_prop has some
-     non-default face.  IT's face is restored in set_iterator_to_next.  */
-  if (it->saved_face_id < 0 || it->saved_face_id != it->face_id)
-    it->saved_face_id = it->face_id = DEFAULT_FACE_ID;
+  /* Use IT->saved_face_id for the ellipsis, so that it has the same
+     face as the preceding text.  IT->saved_face_id was set in
+     handle_stop to the face of the preceding character, and will be
+     different from IT->face_id only if the invisible text skipped in
+     handle_invisible_prop has some non-default face on its first
+     character.  We thus ignore the face of the invisible text when we
+     display the ellipsis.  IT's face is restored in set_iterator_to_next.  */
+  if (it->saved_face_id >= 0)
+    it->face_id = it->saved_face_id;
 
   /* If the ellipsis represents buffer text, it means we advanced in
      the buffer, so we should no longer ignore overlay strings.  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]