fix(events): always allow some events to be nested (#32706)

Always allow the following four events to be nested, as they may contain
important information, and are triggered on the event loop, which may be
processed by a blocking call inside another autocommand.

- ChanInfo
- ChanOpen
- TermRequest
- TermResponse

There are some other events that are triggered on the event loop, but
they are mostly triggered by user actions in a UI client, and therefore
not very likely to happen during another autocommand, so leave them
unchanged for now.
This commit is contained in:
zeertzjq
2025-03-08 07:29:45 +08:00
committed by GitHub
parent 4a0e0e3453
commit f05a6666cf
6 changed files with 106 additions and 3 deletions

View File

@@ -243,7 +243,7 @@ static void emit_termrequest(void **argv)
PUT_C(data, "cursor", ARRAY_OBJ(cursor));
buf_T *buf = handle_get_buffer(term->buf_handle);
apply_autocmds_group(EVENT_TERMREQUEST, NULL, NULL, false, AUGROUP_ALL, buf, NULL,
apply_autocmds_group(EVENT_TERMREQUEST, NULL, NULL, true, AUGROUP_ALL, buf, NULL,
&DICT_OBJ(data));
xfree(sequence);