Patch 8.2.3884

4 views
Skip to first unread message

Bram Moolenaar

unread,
Dec 24, 2021, 1:12:11 PM12/24/21
to vim...@googlegroups.com

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 -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages