]> code.delx.au - gnu-emacs/commitdiff
Fix vertical-motion in truncated lines that end in a stretch
authorEli Zaretskii <eliz@gnu.org>
Sat, 10 Oct 2015 17:01:00 +0000 (20:01 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 10 Oct 2015 17:01:00 +0000 (20:01 +0300)
* src/indent.c (Fvertical_motion): Expect overshoot when point is
beyond window margin and lines are truncated, even if we have a
stretch at point.  (Bug#21468)

src/indent.c

index 584f2179bc5ce1c0fcb78aa2997858b163606168..330065b085ef1ac42c7d43ed426a4e9653a6180a 100644 (file)
@@ -2082,7 +2082,11 @@ whether or not it is currently displayed in some window.  */)
        }
       else
        it_overshoot_count =
-         !(it.method == GET_FROM_IMAGE || it.method == GET_FROM_STRETCH);
+         (!(it.method == GET_FROM_IMAGE
+            || it.method == GET_FROM_STRETCH)
+           /* We will overshoot if lines are truncated and PT lies
+              beyond the right margin of the window.  */
+           || it.line_wrap == TRUNCATE);
 
       if (start_x_given)
        {