0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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.
This commit is contained in:
Bram Moolenaar
2022-07-30 19:10:06 +01:00
parent f39cfb7262
commit 6747cf1671
4 changed files with 18 additions and 3 deletions

View File

@@ -6365,7 +6365,8 @@ win_new_height(win_T *wp, int height)
// 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);
}