mirror of
https://github.com/neovim/neovim.git
synced 2026-04-17 21:12:51 +00:00
Problem: nvim_clear_autocmds() does not type check "event" correctly, and also treats an empty array "event" like nil. Solution: fix type checking. Treat empty array "event" as a no-op, like nvim_exec_autocmds(). Add some extra tests. Likewise the nil handling change may be considered breaking if anyone (unintentionally) relied on that. It was also true that integer, function, etc. "event"s would also be treated like nil! Note that an empty string "event" is still an error, as that's must be an exact match on an event name.