diff options
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index bba7d7b9c2..b1572037cb 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -59,10 +59,6 @@ void nvim_feedkeys(String keys, String mode, Boolean escape_csi) bool typed = false; bool execute = false; - if (keys.size == 0) { - return; - } - for (size_t i = 0; i < mode.size; ++i) { switch (mode.data[i]) { case 'n': remap = false; break; @@ -73,6 +69,10 @@ void nvim_feedkeys(String keys, String mode, Boolean escape_csi) } } + if (keys.size == 0 && !execute) { + return; + } + char *keys_esc; if (escape_csi) { // Need to escape K_SPECIAL and CSI before putting the string in the |