mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
fix(exmode): flush messages before printing a line after pressing Enter (#19341)
This commit is contained in:
@@ -1196,6 +1196,53 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim
|
||||
{4:Press ENTER or type command to continue}^ |
|
||||
]]}
|
||||
end)
|
||||
|
||||
it('prints lines in Ex mode correctly with a burst of carriage returns #19341', function()
|
||||
command('set number')
|
||||
meths.buf_set_lines(0, 0, 0, true, {'aaa', 'bbb', 'ccc'})
|
||||
command('set display-=msgsep')
|
||||
feed('gggQ<CR><CR>1<CR><CR>vi')
|
||||
screen:expect([[
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{11: 2 }bbb |
|
||||
{11: 3 }ccc |
|
||||
:1 |
|
||||
{11: 1 }aaa |
|
||||
{11: 2 }bbb |
|
||||
:vi^ |
|
||||
]])
|
||||
feed('<CR>')
|
||||
screen:expect([[
|
||||
{11: 1 }aaa |
|
||||
{11: 2 }^bbb |
|
||||
{11: 3 }ccc |
|
||||
{11: 4 } |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
|
|
||||
]])
|
||||
command('set display+=msgsep')
|
||||
feed('gggQ<CR><CR>1<CR><CR>vi')
|
||||
screen:expect([[
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{11: 2 }bbb |
|
||||
{11: 3 }ccc |
|
||||
:1 |
|
||||
{11: 1 }aaa |
|
||||
{11: 2 }bbb |
|
||||
:vi^ |
|
||||
]])
|
||||
feed('<CR>')
|
||||
screen:expect([[
|
||||
{11: 1 }aaa |
|
||||
{11: 2 }^bbb |
|
||||
{11: 3 }ccc |
|
||||
{11: 4 } |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
|
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('ui/ext_messages', function()
|
||||
|
||||
Reference in New Issue
Block a user