vim-patch:8.1.2341: not so easy to interrupt a script programatically

Problem:    Not so easy to interrupt a script programatically.
Solution:   Add the interrupt() function. (Yasuhiro Matsumoto, closes vim/vim#2834)
67a2deb9cb
This commit is contained in:
Jan Edmund Lazo
2020-08-03 16:25:12 -04:00
parent 6d68b2801b
commit 0680b5218e
5 changed files with 60 additions and 11 deletions

View File

@@ -4717,6 +4717,14 @@ static void f_insert(typval_T *argvars, typval_T *rettv, FunPtr fptr)
}
}
// "interrupt()" function
static void f_interrupt(typval_T *argvars FUNC_ATTR_UNUSED,
typval_T *rettv FUNC_ATTR_UNUSED,
FunPtr fptr FUNC_ATTR_UNUSED)
{
got_int = true;
}
/*
* "invert(expr)" function
*/