mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
fix(events): save v:event for cmdline autocommands separately
(cherry picked from commit 4ef6efe927
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
9bd5ba83ab
commit
ccb718a23d
@@ -185,6 +185,14 @@ describe('cmdline autocommands', function()
|
||||
eq({'notification', 'CmdlineLeave', {{cmdtype='=', cmdlevel=2, abort=false}}}, next_msg())
|
||||
end)
|
||||
|
||||
it('no crash with recursive use of v:event #19484', function()
|
||||
command('autocmd CmdlineEnter * normal :')
|
||||
feed(':')
|
||||
eq({'notification', 'CmdlineEnter', {{cmdtype=':', cmdlevel=1}}}, next_msg())
|
||||
feed('<CR>')
|
||||
eq({'notification', 'CmdlineLeave', {{cmdtype=':', cmdlevel=1, abort=false}}}, next_msg())
|
||||
end)
|
||||
|
||||
it('supports CmdlineChanged' ,function()
|
||||
command("autocmd CmdlineChanged * call rpcnotify(g:channel, 'CmdlineChanged', v:event, getcmdline())")
|
||||
feed(':')
|
||||
|
Reference in New Issue
Block a user