aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-31 19:13:45 +0800
committerGitHub <noreply@github.com>2022-07-31 19:13:45 +0800
commit380417c1ddbd90b084ed27f321b575de34998a9b (patch)
tree99171207e25340bc6bb1b3466f5c192d50d03a4f /src/nvim/window.c
parentabc087f4c65ca547cae58518b42aee82ff4a07f6 (diff)
parent2c522854c78d4e02d7337cf0b06174387f7f4583 (diff)
downloadrneovim-380417c1ddbd90b084ed27f321b575de34998a9b.tar.gz
rneovim-380417c1ddbd90b084ed27f321b575de34998a9b.tar.bz2
rneovim-380417c1ddbd90b084ed27f321b575de34998a9b.zip
Merge pull request #19587 from Shougo/vim-9.0.0114
vim-patch:9.0.{0114,0115,0118}
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 0bd84c0269..7e47a4f820 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -5555,7 +5555,6 @@ static void frame_setheight(frame_T *curfrp, int height)
}
if (curfrp->fr_parent == NULL) {
- // topframe: can only change the command line
if (height > ROWS_AVAIL) {
// If height is greater than the available space, try to create space for
// the frame by reducing 'cmdheight' if possible, while making sure
@@ -6307,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??