mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
vim-patch:9.0.0846: using assert_fails() may cause hit-enter prompt
Problem: Using assert_fails() may cause hit-enter prompt.
Solution: Set no_wait_return. (closes vim/vim#11522)
f220643c26
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -522,14 +522,13 @@ void f_assert_fails(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
return;
|
||||
}
|
||||
|
||||
const char *const cmd = tv_get_string_chk(&argvars[0]);
|
||||
|
||||
// trylevel must be zero for a ":throw" command to be considered failed
|
||||
trylevel = 0;
|
||||
suppress_errthrow = true;
|
||||
in_assert_fails = true;
|
||||
no_wait_return++;
|
||||
|
||||
const char *const cmd = tv_get_string_chk(&argvars[0]);
|
||||
do_cmdline_cmd(cmd);
|
||||
|
||||
// reset here for any errors reported below
|
||||
|
Reference in New Issue
Block a user