fix(api): change default value of 'pattern' in nvim_exec_autocmds (#19115)

Omitting 'pattern' in nvim_exec_autocmds should be equivalent to
omitting the 'fname' argument in :doautoall, which is equivalent to
using an empty string as the pattern. Fixes regression introduced
in #19091.
This commit is contained in:
Gregory Anders
2022-06-27 01:51:33 -06:00
committed by GitHub
parent cf23695dd7
commit 8c2b870544

View File

@ -833,7 +833,7 @@ void nvim_exec_autocmds(Object event, Dict(exec_autocmds) *opts, Error *err)
}
if (patterns.size == 0) {
ADD(patterns, STRING_OBJ(STATIC_CSTR_TO_STRING("*")));
ADD(patterns, STRING_OBJ(STATIC_CSTR_TO_STRING("")));
}
if (opts->data.type != kObjectTypeNil) {