Patch 8.2.3884
Problem:    Crash when clearing the argument list while using it.
Solution:   Lock the argument list for ":all".
Files:      src/arglist.c, src/testdir/test_arglist.vim


*** ../vim-8.2.3883/src/arglist.c       2021-11-29 20:39:06.666101630 +0000
--- src/arglist.c       2021-12-24 18:08:48.421368272 +0000
***************
*** 910,915 ****
--- 910,916 ----
      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,941 ****
--- 937,943 ----
      // 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,1160 ****
--- 1157,1163 ----
  
      // Remove the "lock" on the argument list.
      alist_unlink(alist);
+     arglist_locked = prev_arglist_locked;
  
      --autocmd_no_enter;
  
*** ../vim-8.2.3883/src/testdir/test_arglist.vim        2021-11-18 
15:37:24.286249010 +0000
--- src/testdir/test_arglist.vim        2021-12-24 18:07:54.141442086 +0000
***************
*** 583,586 ****
--- 583,593 ----
    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
*** ../vim-8.2.3883/src/version.c       2021-12-24 16:46:10.919631989 +0000
--- src/version.c       2021-12-24 17:58:56.846204285 +0000
***************
*** 751,752 ****
--- 751,754 ----
  {   /* Add new patch number below this line */
+ /**/
+     3884,
  /**/

-- 
>From "know your smileys":
 :.-(   Crying

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211224181207.3CF811C0641%40moolenaar.net.

Raspunde prin e-mail lui