]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix vertical cursor motion among many images
authorEli Zaretskii <eliz@gnu.org>
Sat, 13 Feb 2021 12:57:25 +0000 (14:57 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 13 Feb 2021 12:57:25 +0000 (14:57 +0200)
* src/xdisp.c (move_it_in_display_line_to): Consider it
MOVE_POS_MATCH_OR_ZV if we are just after an image, stretch, or
display string, and the position matches exactly.  This is needed
when one image follows another at TO_CHARPOS.  (Bug#46464)

src/xdisp.c

index fb8eaf4b96702ba45632df358b66712bdeec9280..125d3ed7f0f6be09e8eb710c0cb8ebb187206f84 100644 (file)
@@ -9227,10 +9227,10 @@ move_it_in_display_line_to (struct it *it,
                      || prev_method == GET_FROM_STRING)
                  /* Passed TO_CHARPOS from left to right.  */
                  && ((prev_pos < to_charpos
-                      && IT_CHARPOS (*it) > to_charpos)
+                      && IT_CHARPOS (*it) >= to_charpos)
                      /* Passed TO_CHARPOS from right to left.  */
                      || (prev_pos > to_charpos
-                         && IT_CHARPOS (*it) < to_charpos)))))
+                         && IT_CHARPOS (*it) <= to_charpos)))))
        {
          if (it->line_wrap != WORD_WRAP || wrap_it.sp < 0)
            {