# HG changeset patch # User Chong Yidong # Date 1221683344 0 # Node ID bc06a22accf3c14acad90180d0a12dcabfd36759 # Parent 2b86022634a886b69426e410770546fca6deb092 (Fvertical_motion): Use position reported by iterator instead of PT for determining screen motion (bug#943). diff -r 2b86022634a8 -r bc06a22accf3 src/indent.c --- a/src/indent.c Wed Sep 17 20:28:53 2008 +0000 +++ b/src/indent.c Wed Sep 17 20:29:04 2008 +0000 @@ -2109,7 +2109,7 @@ } 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 @@ 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);