]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.1.2385: opening cmdline window with feedkeys() does not work v8.1.2385
authorBram Moolenaar <Bram@vim.org>
Wed, 4 Dec 2019 14:11:08 +0000 (15:11 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 4 Dec 2019 14:11:08 +0000 (15:11 +0100)
Problem:    Opening cmdline window with feedkeys() does not work. (Yegappan
            Lakshmanan)
Solution:   Recognize K_CMDWIN also when ex_normal_busy is set.

src/ex_getln.c
src/testdir/test_cmdline.vim
src/version.c

index 25f409b743279ba43c1c25add979c09807a83c5c..769dcb8363020ca3cef4ac98f5b42f38b03a4c8f 100644 (file)
@@ -1361,7 +1361,8 @@ getcmdline_int(
 #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).
index 7a4979e0152e329a49b1387a558debc33a7000da..5e2597930215af8a65ca902f755d545cf8259ba5 100644 (file)
@@ -843,3 +843,8 @@ func Test_buffers_lastused()
   bwipeout bufb
   bwipeout bufc
 endfunc
+
+func Test_cmdwin_feedkeys()
+  " This should not generate E488
+  call feedkeys("q:\<CR>", 'x')
+endfunc
index f7c6e343a99e368278b0a088c4e6b81841b05190..abe541b6d0864c95c692d244d77773001799422b 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2385,
 /**/
     2384,
 /**/