From 96289f24169281da419e8ce1078705258db3229b Mon Sep 17 00:00:00 2001 From: Famiu Haque Date: Thu, 5 May 2022 21:00:47 +0600 Subject: feat(api): add `group_name` to `nvim_get_autocmds` --- src/nvim/api/autocmd.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/nvim/api/autocmd.c b/src/nvim/api/autocmd.c index 010c03e505..4645b77a1c 100644 --- a/src/nvim/api/autocmd.c +++ b/src/nvim/api/autocmd.c @@ -64,6 +64,7 @@ static int64_t next_autocmd_id = 1; /// containing the following fields: /// - id (number): the autocommand id (only when defined with the API). /// - group (integer): the autocommand group id. +/// - group_name (string): the autocommand group name. /// - desc (string): the autocommand description. /// - event (string): the autocommand event. /// - command (string): the autocommand command. @@ -269,6 +270,7 @@ Array nvim_get_autocmds(Dict(get_autocmds) *opts, Error *err) if (ap->group != AUGROUP_DEFAULT) { PUT(autocmd_info, "group", INTEGER_OBJ(ap->group)); + PUT(autocmd_info, "group_name", CSTR_TO_OBJ(augroup_name(ap->group))); } if (ac->id > 0) { -- cgit