fix(api): include event in get_autocmds (#17553)

This commit is contained in:
Christian Clason
2022-03-01 09:07:41 +01:00
committed by GitHub
parent 01139ec82c
commit 37a86a2f96
3 changed files with 13 additions and 1 deletions

View File

@@ -217,6 +217,14 @@ describe('autocmd api', function()
eq(1, #new_aus)
eq(first, new_aus[1])
end)
it('should return event name', function()
command [[au! InsertEnter]]
command [[au InsertEnter * :echo "1"]]
local aus = meths.get_autocmds { event = "InsertEnter" }
eq({ { buflocal = false, command = ':echo "1"', event = "InsertEnter", once = false, pattern = "*" } }, aus)
end)
end)
describe('groups', function()