aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-02-16 07:25:16 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-02-16 08:09:41 +0800
commit968cd1ed933c039b8d60b0110bc6b539c71e387d (patch)
tree07100b51218fc9888becb0613a00eebe76ff7d4a /src/nvim/buffer.c
parentf1c5887377c9ae547a7564ec4fc52d72656a974f (diff)
downloadrneovim-968cd1ed933c039b8d60b0110bc6b539c71e387d.tar.gz
rneovim-968cd1ed933c039b8d60b0110bc6b539c71e387d.tar.bz2
rneovim-968cd1ed933c039b8d60b0110bc6b539c71e387d.zip
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 <Bram@vim.org>
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 129a8c6fb2..98832a98c9 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -1676,7 +1676,7 @@ void enter_buffer(buf_T *buf)
maketitle();
// when autocmds didn't change it
if (curwin->w_topline == 1 && !curwin->w_topline_was_set) {
- scroll_cursor_halfway(false); // redisplay at correct position
+ scroll_cursor_halfway(false, false); // redisplay at correct position
}
// Change directories when the 'acd' option is set.