From d7a240b1e99201fcd8ce17509f115d583b6e53a1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 5 Oct 2023 07:36:14 +0800 Subject: vim-patch:9.0.1981: not being able to scroll up in diff mode (#25506) Problem: Cannot scroll up in diff mode with many filler lines and zero 'scrolloff'. Solution: Invalidate w_cline_row before calling comp_botline(). closes: vim/vim#13256 https://github.com/vim/vim/commit/0583491277dea9d14e000051c26405b90d839072 --- src/nvim/move.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim') diff --git a/src/nvim/move.c b/src/nvim/move.c index dd9737ede2..9e0aa43138 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -2455,11 +2455,11 @@ int onepage(Direction dir, long count) if (curwin->w_topfill == loff.fill) { curwin->w_topline--; curwin->w_topfill = 0; + curwin->w_valid &= ~(VALID_WROW|VALID_CROW); } comp_botline(curwin); curwin->w_cursor.lnum = curwin->w_botline - 1; - curwin->w_valid &= - ~(VALID_WCOL | VALID_CHEIGHT | VALID_WROW | VALID_CROW); + curwin->w_valid &= ~(VALID_WCOL|VALID_CHEIGHT|VALID_WROW|VALID_CROW); } else { curwin->w_topline = loff.lnum; curwin->w_topfill = loff.fill; -- cgit