diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-05-05 20:17:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-05 20:17:11 +0200 |
commit | d14d308ce80df428393bccd36bdfd1c295e8f35f (patch) | |
tree | f79e872932557487d181ebe49a0e0671d6923af0 /src | |
parent | 94eb72cc44fee4cae7a41cb1ff5fb21f81976658 (diff) | |
parent | 96289f24169281da419e8ce1078705258db3229b (diff) | |
download | rneovim-d14d308ce80df428393bccd36bdfd1c295e8f35f.tar.gz rneovim-d14d308ce80df428393bccd36bdfd1c295e8f35f.tar.bz2 rneovim-d14d308ce80df428393bccd36bdfd1c295e8f35f.zip |
Merge pull request #18431 from famiu/feat/api/nvim_get_autocmds/group_name
feat(api): add `group_name` to `nvim_get_autocmds`
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/api/autocmd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/api/autocmd.c b/src/nvim/api/autocmd.c index 6f262ebfa0..76e531e7aa 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) { |