Commit 5efd5515 authored by Eli Zaretskii's avatar Eli Zaretskii

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)
parent 60d121e8
Pipeline #3340 passed with stage
in 59 minutes and 58 seconds
......@@ -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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment