mirror of
https://github.com/neovim/neovim.git
synced 2026-04-23 15:55:36 +00:00
fix(ui): cmdline_block events for exmode #37751
Problem: Exmode is missing cmdline_block events.
Solution: Emit cmdline_block_show/append when executing a cmdline during
exmode. Emit cmdline_block_hide when leaving exmode.
This commit is contained in:
@@ -797,6 +797,38 @@ local function test_cmdline(linegrid)
|
||||
|
|
||||
]])
|
||||
end)
|
||||
|
||||
it('works with exmode', function()
|
||||
feed('gQ')
|
||||
screen:expect({
|
||||
grid = [[
|
||||
|
|
||||
{3: }|
|
||||
Entering Ex mode. Type "|
|
||||
visual" to go to Normal m|
|
||||
ode.^ |
|
||||
]],
|
||||
cmdline = { { content = { { '' } }, firstc = ':', pos = 0 } },
|
||||
})
|
||||
feed('echo "foo"<CR>')
|
||||
screen:expect({
|
||||
grid = [[
|
||||
{3: }|
|
||||
Entering Ex mode. Type "|
|
||||
visual" to go to Normal m|
|
||||
ode. |
|
||||
foo^ |
|
||||
]],
|
||||
cmdline = { { content = { { '' } }, firstc = ':', pos = 0 } },
|
||||
cmdline_block = { { { 'echo "foo"' } } },
|
||||
})
|
||||
feed('vis<CR>')
|
||||
screen:expect([[
|
||||
^ |
|
||||
{1:~ }|*3
|
||||
|
|
||||
]])
|
||||
end)
|
||||
end
|
||||
|
||||
-- the representation of cmdline and cmdline_block contents changed with ext_linegrid
|
||||
|
||||
Reference in New Issue
Block a user