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.
diff --git a/src/window.c b/src/window.c
index 15a4d50..e418f11 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6365,7 +6365,8 @@
// 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);
}