diff options
author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2022-07-31 17:19:17 +0900 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-07-31 17:15:36 +0800 |
commit | 63244f68e70f233b4175ce0018a58932f075d4c5 (patch) | |
tree | 310e98dc31665bd174911bc480f973a0005456f2 /src/nvim/window.c | |
parent | 81a1d26c3eee816abaa3d0e611a8b1a0e473d3a1 (diff) | |
download | rneovim-63244f68e70f233b4175ce0018a58932f075d4c5.tar.gz rneovim-63244f68e70f233b4175ce0018a58932f075d4c5.tar.bz2 rneovim-63244f68e70f233b4175ce0018a58932f075d4c5.zip |
vim-patch:9.0.0115: when 'cmdheight' is zero pressing ':' may scroll a window
Problem: When 'cmdheight' is zero pressing ':' may scroll a window.
Solution: Add the made_cmdheight_nonzero flag and set 'scrolloff' to zero.
https://github.com/vim/vim/commit/6747cf1671bd41cddee77c65b3f9a70509f968db
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index 1fe2a366a5..7e47a4f820 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -6306,7 +6306,8 @@ void win_set_inner_size(win_T *wp) // There is no point in adjusting the scroll position when exiting. Some // values might be invalid. - if (!exiting) { + // Skip scroll_to_fraction() when 'cmdheight' was set to one from zero. + if (!exiting && !made_cmdheight_nonzero) { scroll_to_fraction(wp, prev_height); } redraw_later(wp, NOT_VALID); // SOME_VALID?? |