From 5947f249f838eb56f8d186e69f4f58e9dee009ed Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 18 May 2024 07:00:29 +0800 Subject: fix(move): half-page scrolling with resized grid at eob (#28821) --- src/nvim/move.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim') diff --git a/src/nvim/move.c b/src/nvim/move.c index 074eb0354c..418ece09ed 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -2488,7 +2488,7 @@ int pagescroll(Direction dir, int count, bool half) int curscount = count; // Adjust count so as to not reveal end of buffer lines. if (dir == FORWARD - && (curwin->w_topline + curwin->w_height + count > buflen || hasAnyFolding(curwin))) { + && (curwin->w_topline + curwin->w_height_inner + count > buflen || hasAnyFolding(curwin))) { int n = plines_correct_topline(curwin, curwin->w_topline, NULL, false, NULL); if (n - count < curwin->w_height_inner && curwin->w_topline < buflen) { n += plines_m_win(curwin, curwin->w_topline + 1, buflen, curwin->w_height_inner + count); -- cgit