From 06ff5480ce274daf3b7ad9950a587099200dc8ff Mon Sep 17 00:00:00 2001 From: luukvbaal Date: Tue, 7 Jan 2025 02:00:09 +0100 Subject: vim-patch:9.1.0993: New 'cmdheight' behavior may be surprising #31892 Problem: Although patch 9.1.0990 fixed a real problem/inconsistency, it also introduced new behavior that may break BWC and/or be unexpected. Before 9.1.0990, window commands could make the topframe smaller (without changing 'cmdheight'; quirk that is now fixed), but did not allow extending the topframe beyond the 'cmdheight' set by the user. After 9.1.0990, the user can reduce the 'cmdheight' below the value they set explicitly, through window commands, which may lead to confusion. (aftere v9.1.0990) Solution: Store the value explicitly set by the user and clamp the 'cmdheight' when resizing the topframe. This also applies to dragging laststatus, which in contrast to window commands _did_ allow reducing the 'cmdheight' to values below the one set by the user. So with this patch there is still new behavior, but I think in a way that is less surprising. While at it, also fix a Coverity warning, introduced in v9.1.0990 (Luuk van Baal) https://github.com/vim/vim/commit/c97e8695353565d6b20adffa48aad47f6e09967f --- src/nvim/option.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/nvim/option.c') diff --git a/src/nvim/option.c b/src/nvim/option.c index 824c9988f4..551ea0be20 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2872,8 +2872,6 @@ static const char *validate_num_option(OptIndex opt_idx, OptInt *newval, char *e case kOptCmdheight: if (value < 0) { return e_positive; - } else { - p_ch_was_zero = value == 0; } break; case kOptHistory: -- cgit