@@ -5385,7 +5385,7 @@ ex_vimgrep(exarg_T *eap)
53855385 if (qf_restore_list (qi , save_qfid ) == FAIL )
53865386 goto theend ;
53875387
5388- /* Jump to first match. */
5388+ // Jump to first match.
53895389 if (!qf_list_empty (qi , qi -> qf_curlist ))
53905390 {
53915391 if ((flags & VGR_NOJUMP ) == 0 )
@@ -6844,16 +6844,13 @@ hgr_search_files_in_dir(
68446844/*
68456845 * Search for a pattern in all the help files in the 'runtimepath'
68466846 * and add the matches to a quickfix list.
6847- * 'arg ' is the language specifier. If supplied, then only matches in the
6847+ * 'lang ' is the language specifier. If supplied, then only matches in the
68486848 * specified language are found.
68496849 */
68506850 static void
6851- hgr_search_in_rtp (qf_info_T * qi , regmatch_T * p_regmatch , char_u * arg )
6851+ hgr_search_in_rtp (qf_info_T * qi , regmatch_T * p_regmatch , char_u * lang )
68526852{
68536853 char_u * p ;
6854- #ifdef FEAT_MULTI_LANG
6855- char_u * lang ;
6856- #endif
68576854
68586855#ifdef FEAT_MBYTE
68596856 vimconv_T vc ;
@@ -6865,10 +6862,6 @@ hgr_search_in_rtp(qf_info_T *qi, regmatch_T *p_regmatch, char_u *arg)
68656862 convert_setup (& vc , (char_u * )"utf-8" , p_enc );
68666863#endif
68676864
6868- #ifdef FEAT_MULTI_LANG
6869- /* Check for a specified language */
6870- lang = check_help_lang (arg );
6871- #endif
68726865
68736866 /* Go through all the directories in 'runtimepath' */
68746867 p = p_rtp ;
@@ -6903,6 +6896,7 @@ ex_helpgrep(exarg_T *eap)
69036896 qf_info_T * qi = & ql_info ;
69046897 int new_qi = FALSE;
69056898 char_u * au_name = NULL ;
6899+ char_u * lang = NULL ;
69066900
69076901 switch (eap -> cmdidx )
69086902 {
@@ -6919,7 +6913,7 @@ ex_helpgrep(exarg_T *eap)
69196913#endif
69206914 }
69216915
6922- /* Make 'cpoptions' empty, the 'l' flag should not be used here. */
6916+ // Make 'cpoptions' empty, the 'l' flag should not be used here.
69236917 save_cpo = p_cpo ;
69246918 p_cpo = empty_option ;
69256919
@@ -6930,14 +6924,18 @@ ex_helpgrep(exarg_T *eap)
69306924 return ;
69316925 }
69326926
6927+ #ifdef FEAT_MULTI_LANG
6928+ // Check for a specified language
6929+ lang = check_help_lang (eap -> arg );
6930+ #endif
69336931 regmatch .regprog = vim_regcomp (eap -> arg , RE_MAGIC + RE_STRING );
69346932 regmatch .rm_ic = FALSE;
69356933 if (regmatch .regprog != NULL )
69366934 {
6937- /* create a new quickfix list */
6935+ // create a new quickfix list
69386936 qf_new_list (qi , qf_cmdtitle (* eap -> cmdlinep ));
69396937
6940- hgr_search_in_rtp (qi , & regmatch , eap -> arg );
6938+ hgr_search_in_rtp (qi , & regmatch , lang );
69416939
69426940 vim_regfree (regmatch .regprog );
69436941
@@ -6950,7 +6948,7 @@ ex_helpgrep(exarg_T *eap)
69506948 if (p_cpo == empty_option )
69516949 p_cpo = save_cpo ;
69526950 else
6953- /* Darn, some plugin changed the value. */
6951+ // Darn, some plugin changed the value.
69546952 free_string_option (save_cpo );
69556953
69566954 qf_list_changed (qi , qi -> qf_curlist );
@@ -6973,8 +6971,8 @@ ex_helpgrep(exarg_T *eap)
69736971
69746972 if (eap -> cmdidx == CMD_lhelpgrep )
69756973 {
6976- /* If the help window is not opened or if it already points to the
6977- * correct location list, then free the new location list. */
6974+ // If the help window is not opened or if it already points to the
6975+ // correct location list, then free the new location list.
69786976 if (!bt_help (curwin -> w_buffer ) || curwin -> w_llist == qi )
69796977 {
69806978 if (new_qi )
0 commit comments