From: Eli Zaretskii Date: Sat, 8 Mar 2014 13:18:43 +0000 (+0200) Subject: src/xdisp.c (Fmove_point_visually): Fix previous change. X-Git-Tag: emacs-24.3.90~245 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=281ae1808d7b470e0aa11858ea0b3100d20d1694;p=emacs.git src/xdisp.c (Fmove_point_visually): Fix previous change. Fixes: debbugs:16961 --- diff --git a/src/xdisp.c b/src/xdisp.c index 62915438e50..0216aaea116 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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); } }