From b7c0c8cde87a7f94ca2e320589e747e4c98c2389 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Mon, 27 Jun 2022 01:51:33 -0600 Subject: [PATCH] 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. --- src/nvim/api/autocmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/api/autocmd.c b/src/nvim/api/autocmd.c index 9575dc9900..99886020e9 100644 --- a/src/nvim/api/autocmd.c +++ b/src/nvim/api/autocmd.c @@ -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);