neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit b72931e7040794f8c6adf6c0a446758f14107dda
parent 3814750d3789b5c5690e8fa68066bd864a4f0a8e
Author: Luuk van Baal <luukvbaal@gmail.com>
Date:   Mon, 11 Mar 2024 07:13:48 +0100

feat(ui): allow non-zero 'cmdheight' with ext_messages

Problem:  Arbitrary restriction on 'cmdheight' with ext_messages.
          The 'cmdheight'-area may be desirable for the replacing
          cmdline.
Solution: Allow non-zero 'cmdheight' with ext_messages.

Diffstat:
Msrc/nvim/option.c | 3---
Mtest/functional/ui/messages_spec.lua | 10++++++----
2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/nvim/option.c b/src/nvim/option.c @@ -2024,9 +2024,6 @@ static const char *did_set_cmdheight(optset_T *args) { OptInt old_value = args->os_oldval.number; - if (ui_has(kUIMessages)) { - p_ch = 0; - } if (p_ch > Rows - min_rows() + 1) { p_ch = Rows - min_rows() + 1; } diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua @@ -844,7 +844,7 @@ describe('ui/ext_messages', function() } end) - it('implies ext_cmdline and ignores cmdheight', function() + it("implies ext_cmdline but allows changing 'cmdheight'", function() eq(0, eval('&cmdheight')) feed(':set cmdheight=1') screen:expect { @@ -864,15 +864,17 @@ describe('ui/ext_messages', function() feed('<cr>') screen:expect([[ ^ | - {1:~ }|*4 + {1:~ }|*3 + | ]]) - eq(0, eval('&cmdheight')) + eq(1, eval('&cmdheight')) feed(':set cmdheight=0') screen:expect { grid = [[ ^ | - {1:~ }|*4 + {1:~ }|*3 + | ]], cmdline = { {