aboutsummaryrefslogtreecommitdiffstats
path: root/src/indent.c
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2012-11-23 17:57:09 -0800
committerGlenn Morris <[email protected]>2012-11-23 17:57:09 -0800
commitd125ca15f3751f36a1ec49e3d9f9de1735b43698 (patch)
tree5d2764d6a135cdd7d664c8c43f915a14932cd94c /src/indent.c
parent678a34f4f8e93b8c43e5cdfba423189f4767e5c5 (diff)
parent6d4e8f62e93b575a1da2cd2b4abeb9dce56e1e52 (diff)
Merge from emacs-24; up to 2012-11-19T11:36:[email protected]
Diffstat (limited to 'src/indent.c')
-rw-r--r--src/indent.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/indent.c b/src/indent.c
index eee96061e2..a3abf88fee 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2048,7 +2048,13 @@ whether or not it is currently displayed in some window. */)
comment said this is "so we don't move too far" (2005-01-19
checkin by kfs). But this does nothing useful that I can
tell, and it causes Bug#2694 . -- cyd */
- move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
+ /* When the position we started from is covered by a display
+ string, move_it_to will overshoot it, while vertical-motion
+ wants to put the cursor _before_ the display string. So in
+ that case, we move to buffer position before the display
+ string, and avoid overshooting. */
+ move_it_to (&it, disp_string_at_start_p ? PT - 1 : PT,
+ -1, -1, -1, MOVE_TO_POS);
/* IT may move too far if truncate-lines is on and PT lies
beyond the right margin. IT may also move too far if the