mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-07 06:50:23 -08:00
Fix subtle problem with scroll-down when scroll-margin is nonzero
* src/window.c (window_scroll_pixel_based): Account for scroll-margin when scrolling down, i.e. moving window-start towards the beginning of the buffer. Reported by zhang cc <ccsmile2008@outlook.com> in http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00894.html.
This commit is contained in:
parent
acd289c5a4
commit
0c78822c70
1 changed files with 3 additions and 2 deletions
|
|
@ -5397,12 +5397,13 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
|
||||||
if (it.what == IT_EOB)
|
if (it.what == IT_EOB)
|
||||||
partial_p =
|
partial_p =
|
||||||
it.current_y + it.ascent + it.descent
|
it.current_y + it.ascent + it.descent
|
||||||
> it.last_visible_y - WINDOW_HEADER_LINE_HEIGHT (w);
|
> it.last_visible_y - this_scroll_margin - WINDOW_HEADER_LINE_HEIGHT (w);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
move_it_by_lines (&it, 1);
|
move_it_by_lines (&it, 1);
|
||||||
partial_p =
|
partial_p =
|
||||||
it.current_y > it.last_visible_y - WINDOW_HEADER_LINE_HEIGHT (w);
|
it.current_y
|
||||||
|
> it.last_visible_y - this_scroll_margin - WINDOW_HEADER_LINE_HEIGHT (w);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (charpos == PT && !partial_p
|
if (charpos == PT && !partial_p
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue