File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21687,7 +21687,6 @@ handle_subscript(
2168721687 char_u *s;
2168821688 int len;
2168921689 typval_T functv;
21690- partial_T *pt = NULL;
2169121690
2169221691 while (ret == OK
2169321692 && (**arg == '['
@@ -21698,6 +21697,8 @@ handle_subscript(
2169821697 {
2169921698 if (**arg == '(')
2170021699 {
21700+ partial_T *pt = NULL;
21701+
2170121702 /* need to copy the funcref so that we can clear rettv */
2170221703 if (evaluate)
2170321704 {
Original file line number Diff line number Diff line change @@ -3286,6 +3286,7 @@ ex_vimgrep(exarg_T *eap)
32863286 int fcount ;
32873287 char_u * * fnames ;
32883288 char_u * fname ;
3289+ char_u * title ;
32893290 char_u * s ;
32903291 char_u * p ;
32913292 int fi ;
@@ -3354,6 +3355,7 @@ ex_vimgrep(exarg_T *eap)
33543355
33553356 /* Get the search pattern: either white-separated or enclosed in // */
33563357 regmatch .regprog = NULL ;
3358+ title = vim_strsave (* eap -> cmdlinep );
33573359 p = skip_vimgrep_pat (eap -> arg , & s , & flags );
33583360 if (p == NULL )
33593361 {
@@ -3390,7 +3392,7 @@ ex_vimgrep(exarg_T *eap)
33903392 eap -> cmdidx != CMD_vimgrepadd && eap -> cmdidx != CMD_lvimgrepadd )
33913393 || qi -> qf_curlist == qi -> qf_listcount )
33923394 /* make place for a new list */
3393- qf_new_list (qi , * eap -> cmdlinep );
3395+ qf_new_list (qi , title != NULL ? title : * eap -> cmdlinep );
33943396 else if (qi -> qf_lists [qi -> qf_curlist ].qf_count > 0 )
33953397 /* Adding to existing list, find last entry. */
33963398 for (prevp = qi -> qf_lists [qi -> qf_curlist ].qf_start ;
@@ -3669,6 +3671,7 @@ ex_vimgrep(exarg_T *eap)
36693671 }
36703672
36713673theend :
3674+ vim_free (title );
36723675 vim_free (dirname_now );
36733676 vim_free (dirname_start );
36743677 vim_free (target_dir );
Original file line number Diff line number Diff line change @@ -317,6 +317,23 @@ func Test_errortitle()
317317 augroup ! QfBufWinEnter
318318endfunc
319319
320+ func Test_vimgreptitle ()
321+ augroup QfBufWinEnter
322+ au !
323+ au BufWinEnter * :let g: a= get (w: , ' quickfix_title' , ' NONE' )
324+ augroup END
325+ try
326+ vimgrep /pattern/ j file
327+ catch /E480/
328+ endtry
329+ copen
330+ call assert_equal (' : vimgrep /pattern/j file' , g: a )
331+ augroup QfBufWinEnter
332+ au !
333+ augroup END
334+ augroup ! QfBufWinEnter
335+ endfunc
336+
320337function XqfTitleTests (cchar)
321338 let Xgetexpr = a: cchar . ' getexpr'
322339 if a: cchar == ' c'
Original file line number Diff line number Diff line change @@ -763,6 +763,10 @@ static char *(features[]) =
763763
764764static int included_patches [] =
765765{ /* Add new patch number below this line */
766+ /**/
767+ 1591 ,
768+ /**/
769+ 1590 ,
766770/**/
767771 1589 ,
768772/**/
You can’t perform that action at this time.
0 commit comments