diff options
author | Eli Zaretskii <eliz@gnu.org> | 2014-03-08 15:18:43 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2014-03-08 15:18:43 +0200 |
commit | 281ae1808d7b470e0aa11858ea0b3100d20d1694 (patch) | |
tree | f7b7c1f63ea0cce10494cedfb7d670a92cbc490a /src/xdisp.c | |
parent | 2c65ad215a5459a4d5bbb9f35627a51dcbe3ae55 (diff) | |
download | emacs-281ae1808d7b470e0aa11858ea0b3100d20d1694.tar.gz |
src/xdisp.c (Fmove_point_visually): Fix previous change.
Fixes: debbugs:16961
Diffstat (limited to 'src/xdisp.c')
-rw-r--r-- | src/xdisp.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); } } |