]> git.eshelyaron.com Git - emacs.git/commitdiff
src/xdisp.c (Fmove_point_visually): Fix previous change.
authorEli Zaretskii <eliz@gnu.org>
Sat, 8 Mar 2014 13:18:43 +0000 (15:18 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 8 Mar 2014 13:18:43 +0000 (15:18 +0200)
Fixes: debbugs:16961
src/xdisp.c

index 62915438e504cded17f25ada550fa6c371376237..0216aaea116bb797557a6e322d9275ae5b3f2831 100644 (file)
@@ -20880,7 +20880,10 @@ Value is the new character position of point.  */)
                  SAVE_IT (it2, it, it_data);
                  move_it_in_display_line_to (&it, ZV, target_x,
                                              MOVE_TO_POS | MOVE_TO_X);
-                 target_x = it.current_x - 1;
+                 /* If we arrived at target_x, that _is_ the last
+                    character on the previous line.  */
+                 if (it.current_x != target_x)
+                   target_x = it.current_x - 1;
                  RESTORE_IT (&it, &it2, it_data);
                }
            }