mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 16:58:17 +00:00
vim-patch:8.2.2141: a user command with try/catch may not catch an expression error
Problem: A user command with try/catch may not catch an expression error.
Solution: When an expression fails check for following "|". (closes vim/vim#7469)
8143a53c53
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -2369,7 +2369,11 @@ int eval0(char *arg, typval_T *rettv, exarg_T *eap, evalarg_T *const evalarg)
|
||||
}
|
||||
|
||||
// Some of the expression may not have been consumed. Do not check for
|
||||
// a next command to avoid more errors.
|
||||
// a next command to avoid more errors, unless "|" is following, which
|
||||
// could only be a command separator.
|
||||
if (eap != NULL && skipwhite(p)[0] == '|' && skipwhite(p)[1] != '|') {
|
||||
eap->nextcmd = check_nextcmd(p);
|
||||
}
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user