master 89825881ad2: Merge from origin/emacs-31

Eli Zaretskii <[email protected]>
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: master
commit 89825881ad2795651f3405ecb367db1941adc1d0
Merge: ef448d2ca99 ba625035e7c
Author: Eli Zaretskii <[email protected]>
Commit: Eli Zaretskii <[email protected]>

    Merge from origin/emacs-31
    
    ba625035e7c ; * src/xdisp.c (move_it_vertically_backward): Fix a thin...
---
 src/xdisp.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 5ab9bf9809e..13956673be1 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -11319,15 +11319,15 @@ move_it_vertically_backward (struct it *it, int dy)
   ptrdiff_t to_pos = start_pos;
   do
     {
+      move_it_to (&it2, to_pos, -1, -1, it2.vpos + 1,
+		  (to_pos > 0
+		    ? (MOVE_TO_POS | MOVE_TO_VPOS)
+		   : MOVE_TO_VPOS));
       /* Avoid inflooping of there's a large display string with several
          embedded newlines, which makes move_it_to stop after START_POS
          but still inside a display or overlay string.  */
       if (IT_CHARPOS (it2) >= start_pos)
 	to_pos = -1;
-      move_it_to (&it2, start_pos, -1, -1, it2.vpos + 1,
-		  (to_pos > 0
-		    ? (MOVE_TO_POS | MOVE_TO_VPOS)
-		   : MOVE_TO_VPOS));
     }
   while (!(IT_POS_VALID_AFTER_MOVE_P (&it2)
 	   /* If we are in a display string which starts at START_POS,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.