diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-04-16 10:38:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-16 10:38:17 +0800 |
commit | 60fb8a6a8bd94132a5dbf3a4520ba0db7ae5a9e3 (patch) | |
tree | c601e1b6f153282785c8e92d1d3bf868fef1b04d /test/functional | |
parent | e3c083832c77eb7c24442bd10bbb718599a764d9 (diff) | |
download | rneovim-60fb8a6a8bd94132a5dbf3a4520ba0db7ae5a9e3.tar.gz rneovim-60fb8a6a8bd94132a5dbf3a4520ba0db7ae5a9e3.tar.bz2 rneovim-60fb8a6a8bd94132a5dbf3a4520ba0db7ae5a9e3.zip |
fix(messages): avoid crash with :intro and ch=0 (#28343)
This just copies code from msg_start() to wait_return(). Not sure if
there is a better place to put such a block.
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/ui/messages_spec.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index 867d487183..e4daf3b546 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -1536,6 +1536,35 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim |*4 ]]) end) + + it('supports :intro with cmdheight=0 #26505', function() + screen:try_resize(80, 24) + command('set cmdheight=0') + feed(':intro<CR>') + screen:expect([[ + |*5 + {MATCH:.*}| + | + Nvim is open source and freely distributable | + https://neovim.io/#chat | + | + type :help nvim{18:<Enter>} if you are new! | + type :checkhealth{18:<Enter>} to optimize Nvim | + type :q{18:<Enter>} to exit | + type :help{18:<Enter>} for help | + | + {MATCH: +}type :help news{18:<Enter>} to see changes in v{MATCH:%d+%.%d+ +}| + | + Help poor children in Uganda! | + type :help iccf{18:<Enter>} for information | + |*2 + {3: }| + | + {6:Press ENTER or type command to continue}^ | + ]]) + feed('<CR>') + assert_alive() + end) end) it('calling screenstring() after redrawing between messages without UI #20999', function() |