Problem: Crash when clearing the argument list while using it.
Solution: Lock the argument list for ":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)
// watch out for its size to be changed.
alist = curwin->w_alist;
++alist->al_refcount;
+ arglist_locked = TRUE;
old_curwin = curwin;
old_curtab = curtab;
// Remove the "lock" on the argument list.
alist_unlink(alist);
+ arglist_locked = prev_arglist_locked;
--autocmd_no_enter;
au! BufEnter
endfunc
+func Test_clear_arglist_in_all()
+ n 0 00 000 0000 00000 000000
+ au! * 0 n 0
+ all
+ au! *
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3884,
/**/
3883,
/**/