Merge pull request #21101 from zeertzjq/vim-8.2.4494

vim-patch:8.2.{4494,4496}: find_tags() function is too long
This commit is contained in:
zeertzjq 2022-11-18 15:24:39 +08:00 committed by GitHub
commit f70963f838
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 807 additions and 748 deletions

View File

@ -4308,10 +4308,17 @@ void ex_make(exarg_T *eap)
incr_quickfix_busy();
int 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);
char *errorformat = p_efm;
bool newlist = true;
if (eap->cmdidx != CMD_make && eap->cmdidx != CMD_lmake) {
errorformat = p_gefm;
}
if (eap->cmdidx == CMD_grepadd || eap->cmdidx == CMD_lgrepadd) {
newlist = false;
}
int res = qf_init(wp, fname, errorformat, newlist, qf_cmdtitle(*eap->cmdlinep), enc);
qf_info_T *qi = &ql_info;
if (wp != NULL) {

File diff suppressed because it is too large Load Diff

View File

@ -1448,6 +1448,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&