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 Christian Clason
parent dbe4270db7
commit b7c0c8cde8

View File

@ -793,7 +793,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("")));
}
modeline = api_object_to_bool(opts->modeline, "modeline", true, err);