Skip to content

Instantly share code, notes, and snippets.

@mattn
Last active March 31, 2016 03:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/4ac2c12698156a5e2285129838cf674d to your computer and use it in GitHub Desktop.
Save mattn/4ac2c12698156a5e2285129838cf674d to your computer and use it in GitHub Desktop.
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..726538a 100644
--- a/src/testdir/test_feedkeys.vim
+++ b/src/testdir/test_feedkeys.vim
@@ -6,5 +6,7 @@ func Test_feedkeys_x_with_empty_string()
call assert_equal('', getline('.'))
call feedkeys('', 'x')
call assert_equal('foo', getline('.'))
+ call feedkeys('i', 'x')
+ call assert_equal('foo', getline('.'))
quit!
endfunc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment