mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-26 07:11:34 -08:00
(window_scroll_pixel_based): Fix check for reaching BEGV.
Don't try to make last line fully visible if it is past end of window.
This commit is contained in:
parent
76efe10ec7
commit
07ce8b53ea
1 changed files with 4 additions and 3 deletions
|
|
@ -4149,12 +4149,13 @@ window_scroll_pixel_based (window, n, whole, noerror)
|
|||
|
||||
/* End if we end up at ZV or BEGV. */
|
||||
if ((n > 0 && IT_CHARPOS (it) == ZV)
|
||||
|| (n < 0 && IT_CHARPOS (it) == CHARPOS (start)))
|
||||
|| (n < 0 && IT_CHARPOS (it) == BEGV))
|
||||
{
|
||||
if (IT_CHARPOS (it) == ZV)
|
||||
{
|
||||
if (it.current_y + it.max_ascent + it.max_descent
|
||||
> it.last_visible_y)
|
||||
if (it.current_y < it.last_visible_y
|
||||
&& (it.current_y + it.max_ascent + it.max_descent
|
||||
>= it.last_visible_y))
|
||||
{
|
||||
/* The last line was only partially visible, make it fully
|
||||
visible. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue