diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-09-29 00:41:02 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-09-29 16:45:51 -0400 |
commit | 63b1a7d0cf6d192585c4929cff188e9c255c0a76 (patch) | |
tree | a723685b4d9ed6338e5d73af046fb4251525b73e /src/nvim/ex_docmd.c | |
parent | 6e146d413267de044a1f9f0bbb0290b5387e631c (diff) | |
download | rneovim-63b1a7d0cf6d192585c4929cff188e9c255c0a76.tar.gz rneovim-63b1a7d0cf6d192585c4929cff188e9c255c0a76.tar.bz2 rneovim-63b1a7d0cf6d192585c4929cff188e9c255c0a76.zip |
vim-patch:8.0.1485: weird autocmd may cause arglist to be changed recursively
Problem: Weird autocmd may cause arglist to be changed recursively.
Solution: Prevent recursively changing the argument list. (Christian
Brabandt, closes vim/vim#2472)
https://github.com/vim/vim/commit/9e33efd1523b85a70533930dd43a26925a2b648c
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index ad51de46ee..cec5431bbd 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -6536,6 +6536,13 @@ void alist_expand(int *fnum_list, int fnum_len) void alist_set(alist_T *al, int count, char_u **files, int use_curbuf, int *fnum_list, int fnum_len) { int i; + static int recursive = 0; + + if (recursive) { + EMSG(_(e_au_recursive)); + return; + } + recursive++; alist_clear(al); ga_grow(&al->al_ga, count); @@ -6562,6 +6569,8 @@ void alist_set(alist_T *al, int count, char_u **files, int use_curbuf, int *fnum if (al == &global_alist) arg_had_last = FALSE; + + recursive--; } /* |