aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/lua/executor.c3
-rw-r--r--src/nvim/testdir/test_filetype.vim1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index 30ae274607..164542f4ab 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -1775,10 +1775,13 @@ void nlua_execute_on_key(int c)
// [ vim, vim._on_key, buf ]
lua_pushlstring(lstate, (const char *)buf, buf_len);
+ int save_got_int = got_int;
+ got_int = false; // avoid interrupts when the key typed is Ctrl-C
if (nlua_pcall(lstate, 1, 0)) {
nlua_error(lstate,
_("Error executing vim.on_key Lua callback: %.*s"));
}
+ got_int |= save_got_int;
// [ vim ]
lua_pop(lstate, 1);
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim
index fb6c9e46aa..3c05045dd3 100644
--- a/src/nvim/testdir/test_filetype.vim
+++ b/src/nvim/testdir/test_filetype.vim
@@ -717,6 +717,7 @@ let s:script_checks = {
\ 'routeros': [['#!/path/rsc']],
\ 'fish': [['#!/path/fish']],
\ 'forth': [['#!/path/gforth']],
+ \ 'icon': [['#!/path/icon']],
\ }
" Various forms of "env" optional arguments.