mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 8.2.4494: the find_tags() function is much too long
Problem: The find_tags() function is much too long. Solution: Refactor the function. (Yegappan Lakshmanan, closes #9869)
This commit is contained in:
committed by
Bram Moolenaar
parent
b9c5108593
commit
2f87a99b6e
@@ -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))
|
||||
@@ -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);
|
||||
|
@@ -1427,6 +1427,11 @@ func Test_tagfile_errors()
|
||||
endtry
|
||||
call assert_equal(v:true, caught_431)
|
||||
|
||||
" tag name and file name are not separated by a tab
|
||||
call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
|
||||
\ "foo Xfile 1"], 'Xtags')
|
||||
call assert_fails('tag foo', 'E431:')
|
||||
|
||||
call delete('Xtags')
|
||||
call delete('Xfile')
|
||||
set tags&
|
||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
4494,
|
||||
/**/
|
||||
4493,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user