mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.3798: a :def callback function postpones an error message
Problem: A :def callback function postpones an error message. Solution: Display the error after calling the function. (closes #9340)
This commit is contained in:
@@ -3173,6 +3173,15 @@ call_callback(
|
||||
++callback_depth;
|
||||
ret = call_func(callback->cb_name, len, rettv, argcount, argvars, &funcexe);
|
||||
--callback_depth;
|
||||
|
||||
// When a :def function was called that uses :try an error would be turned
|
||||
// into an exception. Need to give the error here.
|
||||
if (need_rethrow && current_exception != NULL)
|
||||
{
|
||||
need_rethrow = FALSE;
|
||||
handle_did_throw();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user