Skip to content

Commit

Permalink
patch 8.2.4494: the find_tags() function is much too long
Browse files Browse the repository at this point in the history
Problem:    The find_tags() function is much too long.
Solution:   Refactor the function. (Yegappan Lakshmanan, closes #9869)
  • Loading branch information
yegappan authored and brammool committed Mar 2, 2022
1 parent b9c5108 commit 2f87a99
Show file tree
Hide file tree
Showing 4 changed files with 1,115 additions and 1,002 deletions.
14 changes: 9 additions & 5 deletions src/quickfix.c
Original file line number Diff line number Diff line change
Expand Up @@ -5013,6 +5013,8 @@ ex_make(exarg_T *eap)
int res;
char_u *au_name = NULL;
int_u save_qfid;
char_u *errorformat = p_efm;
int newlist = TRUE;

// Redirect ":grep" to ":vimgrep" if 'grepprg' is "internal".
if (grep_internal(eap->cmdidx))
Expand Down Expand Up @@ -5059,11 +5061,13 @@ ex_make(exarg_T *eap)

incr_quickfix_busy();

res = qf_init(wp, fname, (eap->cmdidx != CMD_make
&& eap->cmdidx != CMD_lmake) ? p_gefm : p_efm,
(eap->cmdidx != CMD_grepadd
&& eap->cmdidx != CMD_lgrepadd),
qf_cmdtitle(*eap->cmdlinep), enc);
if (eap->cmdidx != CMD_make && eap->cmdidx != CMD_lmake)
errorformat = p_gefm;
if (eap->cmdidx == CMD_grepadd || eap->cmdidx == CMD_lgrepadd)
newlist = FALSE;

res = qf_init(wp, fname, errorformat, newlist, qf_cmdtitle(*eap->cmdlinep),
enc);
if (wp != NULL)
{
qi = GET_LOC_LIST(wp);
Expand Down

0 comments on commit 2f87a99

Please sign in to comment.