emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 5efd551: Fix display of box around images


From: Eli Zaretskii
Subject: [Emacs-diffs] master 5efd551: Fix display of box around images
Date: Fri, 27 Sep 2019 04:09:15 -0400 (EDT)

branch: master
commit 5efd5515031ca65357732092f3f40e097ef52876
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Fix display of box around images
    
    * src/xdisp.c (face_before_or_after_it_pos): Handle correctly
    when we are called with it->bidi_it.first_elt set.  (Bug#17114)
---
 src/xdisp.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/xdisp.c b/src/xdisp.c
index 6626fbc..95895ec 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4359,6 +4359,11 @@ face_before_or_after_it_pos (struct it *it, bool 
before_p)
              int n = (it->what == IT_COMPOSITION ? it->cmp_it.nchars : 1);
 
              it_copy = *it;
+             /* If this is the first display element,
+                bidi_move_to_visually_next will deliver character at
+                current position without moving, so we need to enlarge N.  */
+             if (it->bidi_it.first_elt)
+               n++;
              while (n--)
                bidi_move_to_visually_next (&it_copy.bidi_it);
 
@@ -4461,6 +4466,11 @@ face_before_or_after_it_pos (struct it *it, bool 
before_p)
              int n = (it->what == IT_COMPOSITION ? it->cmp_it.nchars : 1);
 
              it_copy = *it;
+             /* If this is the first display element,
+                bidi_move_to_visually_next will deliver character at
+                current position without moving, so we need to enlarge N.  */
+             if (it->bidi_it.first_elt)
+               n++;
              while (n--)
                bidi_move_to_visually_next (&it_copy.bidi_it);
 



reply via email to

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