diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-03 16:25:12 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-14 18:20:28 -0400 |
commit | 0680b5218e29f2ebb947d61210d8775ff720f8bb (patch) | |
tree | 1beb49afbaaf709eaa23d4c8e27c623852a95aba /src/nvim/eval/funcs.c | |
parent | 6d68b2801bf74573980b8c1af9871ead001cb922 (diff) | |
download | rneovim-0680b5218e29f2ebb947d61210d8775ff720f8bb.tar.gz rneovim-0680b5218e29f2ebb947d61210d8775ff720f8bb.tar.bz2 rneovim-0680b5218e29f2ebb947d61210d8775ff720f8bb.zip |
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)
https://github.com/vim/vim/commit/67a2deb9cb4ac2224cb1e4d240a5d0659f036264
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r-- | src/nvim/eval/funcs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 1a80d4d4bd..a81f789f0f 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -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 */ |