[vim] 03/139: patch 7.4.1692 Problem: feedkeys('i', 'x') gets stuck, waits for a character to be typed. Solution: Behave like ":normal". (Yasuhiro Matsumoto)
James McCoy
jamessan at debian.org
Fri May 6 03:59:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch debian/sid
in repository vim.
commit 9bd547aca41799605c3a3f83444f6725c2d6eda9
Author: Bram Moolenaar <Bram at vim.org>
Date: Fri Apr 1 21:00:48 2016 +0200
patch 7.4.1692
Problem: feedkeys('i', 'x') gets stuck, waits for a character to be typed.
Solution: Behave like ":normal". (Yasuhiro Matsumoto)
---
src/eval.c | 3 +++
src/testdir/test_feedkeys.vim | 4 ++++
src/version.c | 2 ++
3 files changed, 9 insertions(+)
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 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
/* 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 @@ func Test_feedkeys_x_with_empty_string()
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 char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1692,
+/**/
1691,
/**/
1690,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
More information about the pkg-vim-maintainers
mailing list