diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-03-11 19:44:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-11 19:44:18 +0100 |
commit | 205cf0d2968cadaf769d451bbb3eac3d2dc2e265 (patch) | |
tree | 1349b2844bad232d03ff153efba75fb1f02f91c6 | |
parent | 1da0f3494eb042c84ae5f00654878f7f8cedf3b7 (diff) | |
parent | b72931e7040794f8c6adf6c0a446758f14107dda (diff) | |
download | rneovim-205cf0d2968cadaf769d451bbb3eac3d2dc2e265.tar.gz rneovim-205cf0d2968cadaf769d451bbb3eac3d2dc2e265.tar.bz2 rneovim-205cf0d2968cadaf769d451bbb3eac3d2dc2e265.zip |
Merge pull request #27812 from luukvbaal/cmdheight
feat(ui): allow non-zero 'cmdheight' with ext_messages
-rw-r--r-- | src/nvim/option.c | 3 | ||||
-rw-r--r-- | test/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 index fcc5b5eb06..4f1ec59e77 100644 --- 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 index 31b1464589..c18a07fef0 100644 --- 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 = { { |