Commit b544ab56 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix return value of vertical-motion at ZV (Bug#19553)

 src/indent.c (Fvertical_motion): Return zero if we started from ZV
 and there's an overlay after-string there.
parent 1f179ea1
2015-01-10 Eli Zaretskii <eliz@gnu.org>
* indent.c (Fvertical_motion): Return zero if we started from ZV
and there's an overlay after-string there. (Bug#19553)
2015-01-09 Eli Zaretskii <eliz@gnu.org>
* emacs.c (usage_message): Fix the description of the -nl switch.
......
......@@ -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;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment