(Fvertical_motion): Don't call move_it_by_lines again if moving by a
single line.
This commit is contained in:
parent
efa09d5d1f
commit
d8a7e7fc77
1 changed files with 10 additions and 4 deletions
14
src/indent.c
14
src/indent.c
|
@ -2128,15 +2128,21 @@ whether or not it is currently displayed in some window. */)
|
|||
which might span multiple screen lines (e.g., if it's
|
||||
on a multi-line display string). We want to start
|
||||
from the last line that it occupies. */
|
||||
it.vpos = 0;
|
||||
if (PT < ZV)
|
||||
{
|
||||
while (IT_CHARPOS (it) <= PT)
|
||||
move_it_by_lines (&it, 1, 0);
|
||||
move_it_by_lines (&it, XINT (lines) - 1, 0);
|
||||
{
|
||||
it.vpos = 0;
|
||||
move_it_by_lines (&it, 1, 0);
|
||||
}
|
||||
if (XINT (lines) > 1)
|
||||
move_it_by_lines (&it, XINT (lines) - 1, 0);
|
||||
}
|
||||
else
|
||||
move_it_by_lines (&it, XINT (lines), 0);
|
||||
{
|
||||
it.vpos = 0;
|
||||
move_it_by_lines (&it, XINT (lines), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue