diff options
| author | Eli Zaretskii | 2019-09-27 11:08:26 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-09-27 11:08:26 +0300 |
| commit | 5efd5515031ca65357732092f3f40e097ef52876 (patch) | |
| tree | 508db6a3482ddfaf30026772299f32cd36bdb4f8 | |
| parent | 60d121e87d532682cb1be7c48015dcd5e30db20a (diff) | |
| download | emacs-5efd5515031ca65357732092f3f40e097ef52876.tar.gz emacs-5efd5515031ca65357732092f3f40e097ef52876.zip | |
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)
| -rw-r--r-- | src/xdisp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 6626fbcf63e..95895ec3acb 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) | |||
| 4359 | int n = (it->what == IT_COMPOSITION ? it->cmp_it.nchars : 1); | 4359 | int n = (it->what == IT_COMPOSITION ? it->cmp_it.nchars : 1); |
| 4360 | 4360 | ||
| 4361 | it_copy = *it; | 4361 | it_copy = *it; |
| 4362 | /* If this is the first display element, | ||
| 4363 | bidi_move_to_visually_next will deliver character at | ||
| 4364 | current position without moving, so we need to enlarge N. */ | ||
| 4365 | if (it->bidi_it.first_elt) | ||
| 4366 | n++; | ||
| 4362 | while (n--) | 4367 | while (n--) |
| 4363 | bidi_move_to_visually_next (&it_copy.bidi_it); | 4368 | bidi_move_to_visually_next (&it_copy.bidi_it); |
| 4364 | 4369 | ||
| @@ -4461,6 +4466,11 @@ face_before_or_after_it_pos (struct it *it, bool before_p) | |||
| 4461 | int n = (it->what == IT_COMPOSITION ? it->cmp_it.nchars : 1); | 4466 | int n = (it->what == IT_COMPOSITION ? it->cmp_it.nchars : 1); |
| 4462 | 4467 | ||
| 4463 | it_copy = *it; | 4468 | it_copy = *it; |
| 4469 | /* If this is the first display element, | ||
| 4470 | bidi_move_to_visually_next will deliver character at | ||
| 4471 | current position without moving, so we need to enlarge N. */ | ||
| 4472 | if (it->bidi_it.first_elt) | ||
| 4473 | n++; | ||
| 4464 | while (n--) | 4474 | while (n--) |
| 4465 | bidi_move_to_visually_next (&it_copy.bidi_it); | 4475 | bidi_move_to_visually_next (&it_copy.bidi_it); |
| 4466 | 4476 | ||