call feedkeys("i", "x")

I think this should back to normal mode like ":normal" command.

diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 26f4219..1f19c88 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -10068,7 +10068,9 @@ exec_normal(int was_typed)
                    && typebuf.tb_len > 0)) && !got_int)
     {
        update_topline_cursor();
+       ++ex_normal_busy;
        normal_cmd(&oa, TRUE);  /* execute a Normal mode cmd */
+       --ex_normal_busy;
     }
 }
 
diff --git a/src/testdir/test_feedkeys.vim b/src/testdir/test_feedkeys.vim
index 33cd589..e4a1e4f 100644
--- a/src/testdir/test_feedkeys.vim
+++ b/src/testdir/test_feedkeys.vim
@@ -6,5 +6,8 @@ func Test_feedkeys_x_with_empty_string()
   call assert_equal('', getline('.'))
   call feedkeys('', 'x')
   call assert_equal('foo', getline('.'))
+  call feedkeys('i', 'x')
+  " back to normal mode immediately.
+  call assert_equal('foo', getline('.'))
   quit!
 endfunc


https://gist.github.com/f70b5b3a8f11ae2bf7c72aa8cc1a84f0

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui