aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-14 16:33:37 +0800
committerGitHub <noreply@github.com>2023-04-14 16:33:37 +0800
commit72a327cad20fa2dbb214177cc48c533543d5b9e8 (patch)
tree5682b3c2396ccb6250e4305931e514d1102a8dfb /src/nvim/quickfix.c
parent37bb40701d672d5213ec1be4e21d7808aee968e7 (diff)
parent9c66b48316d85d24ee92d917765700713862aa2d (diff)
downloadrneovim-72a327cad20fa2dbb214177cc48c533543d5b9e8.tar.gz
rneovim-72a327cad20fa2dbb214177cc48c533543d5b9e8.tar.bz2
rneovim-72a327cad20fa2dbb214177cc48c533543d5b9e8.zip
Merge pull request #23081 from zeertzjq/vim-8.2.1062
vim-patch:8.2.{1062,1063,1064,1065,1068,1069,1070,1071,1073,1074,1075,1076,1079,1080,1098,1099,1100,1125,1161,1162,1163,1203,3216}
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index fdcdd71ceb..62eb14342c 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -6957,15 +6957,15 @@ void ex_cexpr(exarg_T *eap)
// Evaluate the expression. When the result is a string or a list we can
// use it to fill the errorlist.
- typval_T tv;
- if (eval0(eap->arg, &tv, eap, &EVALARG_EVALUATE) == FAIL) {
+ typval_T *tv = eval_expr(eap->arg, eap);
+ if (tv == NULL) {
return;
}
- if ((tv.v_type == VAR_STRING && tv.vval.v_string != NULL)
- || tv.v_type == VAR_LIST) {
+ if ((tv->v_type == VAR_STRING && tv->vval.v_string != NULL)
+ || tv->v_type == VAR_LIST) {
incr_quickfix_busy();
- int res = qf_init_ext(qi, qi->qf_curlist, NULL, NULL, &tv, p_efm,
+ int res = qf_init_ext(qi, qi->qf_curlist, NULL, NULL, tv, p_efm,
(eap->cmdidx != CMD_caddexpr
&& eap->cmdidx != CMD_laddexpr),
(linenr_T)0, (linenr_T)0,
@@ -6996,7 +6996,7 @@ void ex_cexpr(exarg_T *eap)
emsg(_("E777: String or List expected"));
}
cleanup:
- tv_clear(&tv);
+ tv_free(tv);
}
// Get the location list for ":lhelpgrep"