patch 8.1.2385: opening cmdline window with feedkeys() does not work
Problem: Opening cmdline window with feedkeys() does not work. (Yegappan
Lakshmanan)
Solution: Recognize K_CMDWIN also when ex_normal_busy is set.
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 25f409b..769dcb8 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1361,7 +1361,8 @@
#ifdef FEAT_CMDWIN
if (c == cedit_key || c == K_CMDWIN)
{
- if (ex_normal_busy == 0 && got_int == FALSE)
+ // TODO: why is ex_normal_busy checked here?
+ if ((c == K_CMDWIN || ex_normal_busy == 0) && got_int == FALSE)
{
/*
* Open a window to edit the command line (and history).
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 7a4979e..5e25979 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -843,3 +843,8 @@
bwipeout bufb
bwipeout bufc
endfunc
+
+func Test_cmdwin_feedkeys()
+ " This should not generate E488
+ call feedkeys("q:\<CR>", 'x')
+endfunc
diff --git a/src/version.c b/src/version.c
index f7c6e34..abe541b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -743,6 +743,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2385,
+/**/
2384,
/**/
2383,