aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r--src/nvim/api/vim.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 46ac3c9022..43d58a539a 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -57,6 +57,7 @@ void vim_feedkeys(String keys, String mode, Boolean escape_csi)
bool remap = true;
bool insert = false;
bool typed = false;
+ bool execute = false;
if (keys.size == 0) {
return;
@@ -68,6 +69,7 @@ void vim_feedkeys(String keys, String mode, Boolean escape_csi)
case 'm': remap = true; break;
case 't': typed = true; break;
case 'i': insert = true; break;
+ case 'x': execute = true; break;
}
}
@@ -86,8 +88,12 @@ void vim_feedkeys(String keys, String mode, Boolean escape_csi)
xfree(keys_esc);
}
- if (vgetc_busy)
+ if (vgetc_busy) {
typebuf_was_filled = true;
+ }
+ if (execute) {
+ exec_normal(true);
+ }
}
/// Passes input keys to Neovim. Unlike `vim_feedkeys`, this will use a
@@ -98,7 +104,7 @@ void vim_feedkeys(String keys, String mode, Boolean escape_csi)
/// @return The number of bytes actually written, which can be lower than
/// requested if the buffer becomes full.
Integer vim_input(String keys)
- FUNC_ATTR_ASYNC
+ FUNC_API_ASYNC
{
return (Integer)input_enqueue(keys);
}
@@ -618,7 +624,7 @@ Dictionary vim_get_color_map(void)
Array vim_get_api_info(uint64_t channel_id)
- FUNC_ATTR_ASYNC
+ FUNC_API_ASYNC
{
Array rv = ARRAY_DICT_INIT;