aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-18 13:25:21 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-18 14:59:18 +0800
commit245035d6db7399cc077de0eaa8e97e2eecc08a9b (patch)
tree8d07e90dc1f7ff3cc7dda29255aa29cc5310395b /src/nvim/quickfix.c
parent282cbc2350986c3fc1edb507c4facc8d8fe8cd97 (diff)
downloadrneovim-245035d6db7399cc077de0eaa8e97e2eecc08a9b.tar.gz
rneovim-245035d6db7399cc077de0eaa8e97e2eecc08a9b.tar.bz2
rneovim-245035d6db7399cc077de0eaa8e97e2eecc08a9b.zip
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) https://github.com/vim/vim/commit/2f87a99b6e9b559d51e130769e7f8377db6749f8 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index d7590f6f57..27a0842016 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -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) {