mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
vim-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 vim/vim#9869)
2f87a99b6e
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
parent
282cbc2350
commit
245035d6db
@ -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) {
|
||||
|
1527
src/nvim/tag.c
1527
src/nvim/tag.c
File diff suppressed because it is too large
Load Diff
@ -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&
|
||||
|
Loading…
Reference in New Issue
Block a user