Steps to reproduce
- First set the terminal window to approximately 40 lines and 80 columns. Check with
$LINES and $COLUMNS.
- Then run
vim --clean test.vim -S test.vim, with
set nosplitscroll
set splitbelow
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" empty lines
" augroup test
" autocmd!
" augroup END
- Move the cursor to the very last line and place it on
augroup. Then press K to open the help for augroup. When opening the split, the previously focused window is NOT scrolled. Immediately close the help window with :q.
- Result: The previously focused window that displays
test.vim has been scrolled.
For some reasons this depends on the size of the terminal window as well as on the location of the cursor in the current window before the split occurs. When opening a new split, the last window is never scrolled but when closing the new split the last window is often scrolled.
Expected behaviour
No scrolling when Vim's help window is closed.
Version of Vim
9.0.478
Environment
Linux, alacritty terminal
Logs and stack traces
No response