diff options
Diffstat (limited to 'src/indent.c')
-rw-r--r-- | src/indent.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/indent.c b/src/indent.c index 589aeb9c005..8660400e1ce 100644 --- a/src/indent.c +++ b/src/indent.c @@ -2137,10 +2137,15 @@ whether or not it is currently displayed in some window. */) if (nlines > 1) move_it_by_lines (&it, min (PTRDIFF_MAX, nlines - 1)); } - else + else /* it_start = ZV */ { it.vpos = 0; move_it_by_lines (&it, min (PTRDIFF_MAX, nlines)); + /* We could have some display or overlay string at ZV, + in which case it.vpos will be nonzero now, while + actually we didn't move vertically at all. */ + if (IT_CHARPOS (it) == CHARPOS (pt) && CHARPOS (pt) == it_start) + it.vpos = 0; } } |