Mercurial > vim
comparison src/evalvars.c @ 31263:d8e7d725a666 v9.0.0965
patch 9.0.0965: using one window for executing autocommands is insufficient
Commit: https://github.com/vim/vim/commit/e76062c078debed0df818f70e4db14ad7a7cb53a
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Nov 28 18:51:43 2022 +0000
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 28 Nov 2022 20:00:05 +0100 |
parents | 684e6dfa2fba |
children | b6bef244837e |
comparison
equal
deleted
inserted
replaced
31262:7f766b7e17d5 | 31263:d8e7d725a666 |
---|---|
4759 { | 4759 { |
4760 if (*varname == '&') | 4760 if (*varname == '&') |
4761 { | 4761 { |
4762 aco_save_T aco; | 4762 aco_save_T aco; |
4763 | 4763 |
4764 // set curbuf to be our buf, temporarily | 4764 // Set curbuf to be our buf, temporarily. |
4765 aucmd_prepbuf(&aco, buf); | 4765 aucmd_prepbuf(&aco, buf); |
4766 | 4766 if (curbuf == buf) |
4767 set_option_from_tv(varname + 1, varp); | 4767 { |
4768 | 4768 // Only when it worked to set "curbuf". |
4769 // reset notion of buffer | 4769 set_option_from_tv(varname + 1, varp); |
4770 aucmd_restbuf(&aco); | 4770 |
4771 // reset notion of buffer | |
4772 aucmd_restbuf(&aco); | |
4773 } | |
4771 } | 4774 } |
4772 else | 4775 else |
4773 { | 4776 { |
4774 bufvarname = alloc(STRLEN(varname) + 3); | 4777 bufvarname = alloc(STRLEN(varname) + 3); |
4775 if (bufvarname != NULL) | 4778 if (bufvarname != NULL) |