From 968cd1ed933c039b8d60b0110bc6b539c71e387d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 16 Feb 2023 07:25:16 +0800 Subject: vim-patch:9.0.1309: scrolling two lines with even line count and 'scrolloff' set Problem: Scrolling two lines with even line count and 'scrolloff' set. Solution: Adjust how the topline is computed. (closes vim/vim#10545) https://github.com/vim/vim/commit/1d6539cf36a7b6d1afe76fb6316fe662f543bf60 Cherry-pick test_scroll_opt.vim changes from patch 8.2.1432. Co-authored-by: Bram Moolenaar --- src/nvim/normal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/normal.c') diff --git a/src/nvim/normal.c b/src/nvim/normal.c index a84d5c73a4..f1226584d7 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -2856,7 +2856,7 @@ static void nv_zet(cmdarg_T *cap) FALLTHROUGH; case 'z': - scroll_cursor_halfway(true); + scroll_cursor_halfway(true, false); redraw_later(curwin, UPD_VALID); set_fraction(curwin); break; -- cgit