0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 9.0.0965: using one window for executing autocommands is insufficient

Problem:    Using one window for executing autocommands is insufficient.
Solution:   Use up to five windows for executing autocommands.
This commit is contained in:
Bram Moolenaar
2022-11-28 18:51:43 +00:00
parent 74a694dbe2
commit e76062c078
28 changed files with 451 additions and 260 deletions

View File

@@ -4761,13 +4761,16 @@ f_setbufvar(typval_T *argvars, typval_T *rettv UNUSED)
{
aco_save_T aco;
// set curbuf to be our buf, temporarily
// Set curbuf to be our buf, temporarily.
aucmd_prepbuf(&aco, buf);
if (curbuf == buf)
{
// Only when it worked to set "curbuf".
set_option_from_tv(varname + 1, varp);
set_option_from_tv(varname + 1, varp);
// reset notion of buffer
aucmd_restbuf(&aco);
// reset notion of buffer
aucmd_restbuf(&aco);
}
}
else
{