Mercurial > vim
diff src/evalfunc.c @ 28917:c5862dfaf0bd v8.2.4981
patch 8.2.4981: it is not possible to manipulate autocommands
Commit: https://github.com/vim/vim/commit/1755a91851f7022fdd3eecfbd2cc0b508a2f2a8f
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Thu May 19 10:31:47 2022 +0100
patch 8.2.4981: it is not possible to manipulate autocommands
Problem: It is not possible to manipulate autocommands.
Solution: Add functions to add, get and set autocommands. (Yegappan
Lakshmanan, closes #10291)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 19 May 2022 11:45:05 +0200 |
parents | 18604231a1d1 |
children | 6cdf55afaae9 |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -1587,6 +1587,12 @@ static funcentry_T global_functions[] = ret_float, FLOAT_FUNC(f_atan)}, {"atan2", 2, 2, FEARG_1, arg2_float_or_nr, ret_float, FLOAT_FUNC(f_atan2)}, + {"autocmd_add", 1, 1, FEARG_1, arg1_list_any, + ret_number_bool, f_autocmd_add}, + {"autocmd_delete", 1, 1, FEARG_1, arg1_list_any, + ret_number_bool, f_autocmd_delete}, + {"autocmd_get", 0, 1, FEARG_1, arg1_dict_any, + ret_list_dict_any, f_autocmd_get}, {"balloon_gettext", 0, 0, 0, NULL, ret_string, #ifdef FEAT_BEVAL