]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.0993: New 'cmdheight' behavior may be surprising v9.1.0993
authorLuuk van Baal <luukvbaal@gmail.com>
Mon, 6 Jan 2025 17:58:21 +0000 (18:58 +0100)
committerChristian Brabandt <cb@256bit.org>
Mon, 6 Jan 2025 17:58:21 +0000 (18:58 +0100)
commitc97e8695353565d6b20adffa48aad47f6e09967f
tree47c5be877c3b68cd66d0cb59b9fb0bd33a5b2ff2
parent3159b6494ec08fbe780d14e54ad4e89e7b55bb16
patch 9.1.0993: New 'cmdheight' behavior may be surprising

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)

closes: #16385

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/dumps/Test_changing_cmdheight_3.dump
src/testdir/dumps/Test_changing_cmdheight_8.dump [new file with mode: 0644]
src/testdir/test_cmdline.vim
src/version.c
src/window.c