File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5520,14 +5520,6 @@ ex_cbuffer(exarg_T *eap)
55205520#endif
55215521 int res ;
55225522
5523- if (eap -> cmdidx == CMD_lbuffer || eap -> cmdidx == CMD_lgetbuffer
5524- || eap -> cmdidx == CMD_laddbuffer )
5525- {
5526- qi = ll_get_or_alloc_list (curwin );
5527- if (qi == NULL )
5528- return ;
5529- }
5530-
55315523#ifdef FEAT_AUTOCMD
55325524 switch (eap -> cmdidx )
55335525 {
@@ -5549,6 +5541,15 @@ ex_cbuffer(exarg_T *eap)
55495541 }
55505542#endif
55515543
5544+ /* Must come after autocommands. */
5545+ if (eap -> cmdidx == CMD_lbuffer || eap -> cmdidx == CMD_lgetbuffer
5546+ || eap -> cmdidx == CMD_laddbuffer )
5547+ {
5548+ qi = ll_get_or_alloc_list (curwin );
5549+ if (qi == NULL )
5550+ return ;
5551+ }
5552+
55525553 if (* eap -> arg == NUL )
55535554 buf = curbuf ;
55545555 else if (* skipwhite (skipdigits (eap -> arg )) == NUL )
Original file line number Diff line number Diff line change @@ -1178,3 +1178,10 @@ func Test_nocatch_wipe_dummy_buffer()
11781178 call assert_fails (' lv½ /x' , ' E480' )
11791179 au !
11801180endfunc
1181+
1182+ func Test_wipe_cbuffer ()
1183+ sv x
1184+ au * * bw
1185+ lb
1186+ au !
1187+ endfunc
Original file line number Diff line number Diff line change @@ -771,6 +771,8 @@ static char *(features[]) =
771771
772772static int included_patches [] =
773773{ /* Add new patch number below this line */
774+ /**/
775+ 1413 ,
774776/**/
775777 1412 ,
776778/**/
You can’t perform that action at this time.
0 commit comments