mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
fix(api): fix nvim_parse_cmd interfere with printing line in Ex mode (#19400)
This commit is contained in:
@@ -3624,6 +3624,38 @@ describe('API', function()
|
||||
eq('Error while parsing command line: E464: Ambiguous use of user-defined command',
|
||||
pcall_err(meths.parse_cmd, 'F', {}))
|
||||
end)
|
||||
it('does not interfere with printing line in Ex mode #19400', function()
|
||||
local screen = Screen.new(60, 7)
|
||||
screen:set_default_attr_ids({
|
||||
[0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText
|
||||
[1] = {bold = true, reverse = true}, -- MsgSeparator
|
||||
})
|
||||
screen:attach()
|
||||
insert([[
|
||||
foo
|
||||
bar]])
|
||||
feed('gQ1')
|
||||
screen:expect([[
|
||||
foo |
|
||||
bar |
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{1: }|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:1^ |
|
||||
]])
|
||||
eq('Error while parsing command line', pcall_err(meths.parse_cmd, '', {}))
|
||||
feed('<CR>')
|
||||
screen:expect([[
|
||||
foo |
|
||||
bar |
|
||||
{1: }|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:1 |
|
||||
foo |
|
||||
:^ |
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
describe('nvim_cmd', function()
|
||||
it('works', function ()
|
||||
|
Reference in New Issue
Block a user