mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44: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;
|
int res;
|
||||||
char_u *au_name = NULL;
|
char_u *au_name = NULL;
|
||||||
int_u save_qfid;
|
int_u save_qfid;
|
||||||
|
char_u *errorformat = p_efm;
|
||||||
|
int newlist = TRUE;
|
||||||
|
|
||||||
// Redirect ":grep" to ":vimgrep" if 'grepprg' is "internal".
|
// Redirect ":grep" to ":vimgrep" if 'grepprg' is "internal".
|
||||||
if (grep_internal(eap->cmdidx))
|
if (grep_internal(eap->cmdidx))
|
||||||
@@ -5059,11 +5061,13 @@ ex_make(exarg_T *eap)
|
|||||||
|
|
||||||
incr_quickfix_busy();
|
incr_quickfix_busy();
|
||||||
|
|
||||||
res = qf_init(wp, fname, (eap->cmdidx != CMD_make
|
if (eap->cmdidx != CMD_make && eap->cmdidx != CMD_lmake)
|
||||||
&& eap->cmdidx != CMD_lmake) ? p_gefm : p_efm,
|
errorformat = p_gefm;
|
||||||
(eap->cmdidx != CMD_grepadd
|
if (eap->cmdidx == CMD_grepadd || eap->cmdidx == CMD_lgrepadd)
|
||||||
&& eap->cmdidx != CMD_lgrepadd),
|
newlist = FALSE;
|
||||||
qf_cmdtitle(*eap->cmdlinep), enc);
|
|
||||||
|
res = qf_init(wp, fname, errorformat, newlist, qf_cmdtitle(*eap->cmdlinep),
|
||||||
|
enc);
|
||||||
if (wp != NULL)
|
if (wp != NULL)
|
||||||
{
|
{
|
||||||
qi = GET_LOC_LIST(wp);
|
qi = GET_LOC_LIST(wp);
|
||||||
|
@@ -1427,6 +1427,11 @@ func Test_tagfile_errors()
|
|||||||
endtry
|
endtry
|
||||||
call assert_equal(v:true, caught_431)
|
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('Xtags')
|
||||||
call delete('Xfile')
|
call delete('Xfile')
|
||||||
set tags&
|
set tags&
|
||||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4494,
|
||||||
/**/
|
/**/
|
||||||
4493,
|
4493,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user