mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
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)
1d6539cf36
Cherry-pick test_scroll_opt.vim changes from patch 8.2.1432.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user