patch 7.4.1692
Problem: feedkeys('i', 'x') gets stuck, waits for a character to be typed.
Solution: Behave like ":normal". (Yasuhiro Matsumoto)
diff --git a/src/eval.c b/src/eval.c
index b2f4462..e1d69d0 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -11368,7 +11368,10 @@
/* Avoid a 1 second delay when the keys start Insert mode. */
msg_scroll = FALSE;
+
+ ++ex_normal_busy;
exec_normal(TRUE);
+ --ex_normal_busy;
msg_scroll |= save_msg_scroll;
}
}
diff --git a/src/testdir/test_feedkeys.vim b/src/testdir/test_feedkeys.vim
index 33cd589..70500f2 100644
--- a/src/testdir/test_feedkeys.vim
+++ b/src/testdir/test_feedkeys.vim
@@ -6,5 +6,9 @@
call assert_equal('', getline('.'))
call feedkeys('', 'x')
call assert_equal('foo', getline('.'))
+
+ " check it goes back to normal mode immediately.
+ call feedkeys('i', 'x')
+ call assert_equal('foo', getline('.'))
quit!
endfunc
diff --git a/src/version.c b/src/version.c
index d08e730..c1e8fb7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1692,
+/**/
1691,
/**/
1690,