From 2421af7e64f793a3cd8545dde64de6c2f84a51d3 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 17 Sep 2008 20:29:04 +0000 Subject: [PATCH] (Fvertical_motion): Use position reported by iterator instead of PT for determining screen motion (bug#943). --- src/indent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/indent.c b/src/indent.c index edb445c296f..ba4787aa1c5 100644 --- a/src/indent.c +++ b/src/indent.c @@ -2109,7 +2109,7 @@ whether or not it is currently displayed in some window. */) } else { - if (IT_CHARPOS (it) > PT) + if (IT_CHARPOS (it) > it_start) { /* IT may move too far if truncate-lines is on and PT lies beyond the right margin. In that case, @@ -2135,7 +2135,7 @@ whether or not it is currently displayed in some window. */) from the last line that it occupies. */ if (PT < ZV) { - while (IT_CHARPOS (it) <= PT) + while (IT_CHARPOS (it) <= it_start) { it.vpos = 0; move_it_by_lines (&it, 1, 0); -- 2.39.5