From 5b2c9f4339c6cd9778b099268fcfee87a888324d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 10 Oct 2015 20:01:00 +0300 Subject: [PATCH] Fix vertical-motion in truncated lines that end in a stretch * 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/indent.c b/src/indent.c index 584f2179bc5..330065b085e 100644 --- a/src/indent.c +++ b/src/indent.c @@ -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) { -- 2.39.2