diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-11-15 08:18:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-15 00:18:53 +0000 |
commit | 54c85bcb6d55ae7fa749e9998b67ebbcda58f4b9 (patch) | |
tree | 47f1aeec4ea3f6f2bf8bcb2bd87369dd4ea12474 /test/functional/legacy/cmdline_spec.lua | |
parent | fa0dcde3d9f17f85baa9dd41aa751c123281ced3 (diff) | |
download | rneovim-54c85bcb6d55ae7fa749e9998b67ebbcda58f4b9.tar.gz rneovim-54c85bcb6d55ae7fa749e9998b67ebbcda58f4b9.tar.bz2 rneovim-54c85bcb6d55ae7fa749e9998b67ebbcda58f4b9.zip |
vim-patch:9.1.0855: setting 'cmdheight' may missing output (#31216)
Problem: setting 'cmdheight' may cause hit-enter-prompt and echo output
to be missing
Solution: Before cleaning the cmdline, check the need_wait_return flag
(nwounkn)
closes: vim/vim#13432
https://github.com/vim/vim/commit/2e48567007f2becd484a3c3dd0706bf3a0beeae7
Co-authored-by: nwounkn <nwounkn@gmail.com>
Diffstat (limited to 'test/functional/legacy/cmdline_spec.lua')
-rw-r--r-- | test/functional/legacy/cmdline_spec.lua | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/test/functional/legacy/cmdline_spec.lua b/test/functional/legacy/cmdline_spec.lua index 7ab2793341..bf146e1322 100644 --- a/test/functional/legacy/cmdline_spec.lua +++ b/test/functional/legacy/cmdline_spec.lua @@ -139,10 +139,17 @@ describe('cmdline', function() ]]) end) - it("setting 'cmdheight' works after outputting two messages vim-patch:9.0.0665", function() + -- oldtest: Test_changing_cmdheight() + it("changing 'cmdheight'", function() local screen = Screen.new(60, 8) exec([[ set cmdheight=1 laststatus=2 + func EchoOne() + set laststatus=2 cmdheight=1 + echo 'foo' + echo 'bar' + set cmdheight=2 + endfunc func EchoTwo() set laststatus=2 set cmdheight=5 @@ -151,6 +158,8 @@ describe('cmdline', function() set cmdheight=1 endfunc ]]) + + -- setting 'cmdheight' works after outputting two messages feed(':call EchoTwo()') screen:expect([[ | @@ -165,6 +174,17 @@ describe('cmdline', function() {3:[No Name] }| | ]]) + + -- increasing 'cmdheight' doesn't clear the messages that need hit-enter + feed(':call EchoOne()<CR>') + screen:expect([[ + | + {1:~ }|*3 + {3: }| + foo | + bar | + {6:Press ENTER or type command to continue}^ | + ]]) end) -- oldtest: Test_cmdheight_tabline() |