feat(api): enable nvim_exec_autocmds to pass arbitrary data (#18613)

Add a "data" key to nvim_exec_autocmds that passes arbitrary data (API
objects) to autocommand callbacks.
This commit is contained in:
Gregory Anders
2022-05-18 09:51:26 -06:00
committed by GitHub
parent d7dd600716
commit 8a9ab88945
6 changed files with 56 additions and 6 deletions

View File

@@ -57,6 +57,7 @@ typedef struct AutoPatCmd {
char *tail; // tail of fname
event_T event; // current event
int arg_bufnr; // initially equal to <abuf>, set to zero when buf is deleted
Object *data; // arbitrary data
struct AutoPatCmd *next; // chain of active apc-s for auto-invalidation
} AutoPatCmd;