diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-24 18:11:27 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-24 18:11:27 +0000 |
commit | 6f98371532fcff911b462d51bc64f2ce8a6ae682 (patch) | |
tree | 983523d888e38f02ce5f5505138780106f4ec016 /src/arglist.c | |
parent | 5937c7505f444dd896f336fa0119a93a55ebe9a2 (diff) |
patch 8.2.3884: crash when clearing the argument list while using itv8.2.3884
Problem: Crash when clearing the argument list while using it.
Solution: Lock the argument list for ":all".
Diffstat (limited to 'src/arglist.c')
-rw-r--r-- | src/arglist.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/arglist.c b/src/arglist.c index 24b0a870e2..af8ce740fc 100644 --- a/src/arglist.c +++ b/src/arglist.c @@ -910,6 +910,7 @@ do_arg_all( tabpage_T *old_curtab, *last_curtab; win_T *new_curwin = NULL; tabpage_T *new_curtab = NULL; + int prev_arglist_locked = arglist_locked; #ifdef FEAT_CMDWIN if (cmdwin_type != 0) @@ -936,6 +937,7 @@ do_arg_all( // watch out for its size to be changed. alist = curwin->w_alist; ++alist->al_refcount; + arglist_locked = TRUE; old_curwin = curwin; old_curtab = curtab; @@ -1155,6 +1157,7 @@ do_arg_all( // Remove the "lock" on the argument list. alist_unlink(alist); + arglist_locked = prev_arglist_locked; --autocmd_no_enter; |