From: Chong Yidong Date: Wed, 17 Sep 2008 20:29:04 +0000 (+0000) Subject: (Fvertical_motion): Use position reported by iterator X-Git-Tag: emacs-pretest-23.0.90~2871 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2421af7e64f793a3cd8545dde64de6c2f84a51d3;p=emacs.git (Fvertical_motion): Use position reported by iterator instead of PT for determining screen motion (bug#943). --- 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);