aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-06 08:17:14 +0800
committerGitHub <noreply@github.com>2023-05-06 08:17:14 +0800
commitb97d2abb216477dddfca9ce74077d157045f22cf (patch)
treee87e2da65fd5ea42a537d806c26dd7b15333b40d /src/nvim/eval.c
parent22205f36a6213f51f211a67444b335f916a2fa9f (diff)
parent6b912dec8ef06535b164b0f4eb3d55775eb9f6a8 (diff)
downloadrneovim-b97d2abb216477dddfca9ce74077d157045f22cf.tar.gz
rneovim-b97d2abb216477dddfca9ce74077d157045f22cf.tar.bz2
rneovim-b97d2abb216477dddfca9ce74077d157045f22cf.zip
Merge pull request #23488 from zeertzjq/vim-8.2.2094
vim-patch:8.2.{2094,2141},9.0.1508
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 07f65bbf22..42e53cfdfc 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -2367,7 +2367,17 @@ int eval0(char *arg, typval_T *rettv, exarg_T *eap, evalarg_T *const evalarg)
semsg(_(e_invexpr2), arg);
}
}
- ret = FAIL;
+
+ if (eap != NULL && p != NULL) {
+ // Some of the expression may not have been consumed.
+ // Only execute a next command if it cannot be a "||" operator.
+ // The next command may be "catch".
+ char *nextcmd = check_nextcmd(p);
+ if (nextcmd != NULL && *nextcmd != '|') {
+ eap->nextcmd = nextcmd;
+ }
+ }
+ return FAIL;
}
if (eap != NULL) {