mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00: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:
@@ -4308,10 +4308,17 @@ void ex_make(exarg_T *eap)
|
|||||||
|
|
||||||
incr_quickfix_busy();
|
incr_quickfix_busy();
|
||||||
|
|
||||||
int res = qf_init(wp, fname, (eap->cmdidx != CMD_make
|
char *errorformat = p_efm;
|
||||||
&& eap->cmdidx != CMD_lmake) ? p_gefm : p_efm,
|
bool newlist = true;
|
||||||
(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;
|
||||||
|
}
|
||||||
|
|
||||||
|
int res = qf_init(wp, fname, errorformat, newlist, qf_cmdtitle(*eap->cmdlinep), enc);
|
||||||
|
|
||||||
qf_info_T *qi = &ql_info;
|
qf_info_T *qi = &ql_info;
|
||||||
if (wp != NULL) {
|
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
|
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&
|
||||||
|
Reference in New Issue
Block a user