mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 06:48:17 +00:00
vim-patch:8.2.0267: no check for a following cmd when calling a function fails
Problem: No check for a following command when calling a function fails.
Solution: Also check for a following command when inside a try block.
(closes vim/vim#5642)
e51bb17dd0
This commit is contained in:
@@ -2852,7 +2852,8 @@ void ex_call(exarg_T *eap)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!failed) {
|
// When inside :try we need to check for following "| catch".
|
||||||
|
if (!failed || eap->cstack->cs_trylevel > 0) {
|
||||||
// Check for trailing illegal characters and a following command.
|
// Check for trailing illegal characters and a following command.
|
||||||
if (!ends_excmd(*arg)) {
|
if (!ends_excmd(*arg)) {
|
||||||
emsg_severe = TRUE;
|
emsg_severe = TRUE;
|
||||||
|
@@ -94,3 +94,7 @@ func Test_user_func()
|
|||||||
unlet g:retval g:counter
|
unlet g:retval g:counter
|
||||||
enew!
|
enew!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_failed_call_in_try()
|
||||||
|
try | call UnknownFunc() | catch | endtry
|
||||||
|
endfunc
|
||||||
|
Reference in New Issue
Block a user