]> granicus.if.org Git - vim/commitdiff
patch 8.1.0792: bad display if opening cmdline window from Insert completion v8.1.0792
authorBram Moolenaar <Bram@vim.org>
Tue, 22 Jan 2019 21:08:09 +0000 (22:08 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 22 Jan 2019 21:08:09 +0000 (22:08 +0100)
Problem:    Popup menu is displayed on top of the cmdline window if it is
            opened from Insert completion. (Bjorn Linse)
Solution:   Remove the popup menu.  Restore the cursor position.
            (closes #3838)

src/edit.c
src/ex_getln.c
src/version.c

index 482e644e8d7b344124e833da0a7f3810d9c3b1e8..852060bd26b6e1d8f5b62de6cd133068e3a5b06c 100644 (file)
@@ -8537,6 +8537,7 @@ ins_reg(void)
     ++no_u_sync;
     if (regname == '=')
     {
+       pos_T   curpos = curwin->w_cursor;
 # ifdef HAVE_INPUT_METHOD
        int     im_on = im_get_status();
 # endif
@@ -8545,8 +8546,12 @@ ins_reg(void)
        u_sync_once = 2;
 
        regname = get_expr_register();
+
+       // Cursor may be moved back a column.
+       curwin->w_cursor = curpos;
+       check_cursor();
 # ifdef HAVE_INPUT_METHOD
-       /* Restore the Input Method. */
+       // Restore the Input Method.
        if (im_on)
            im_set_active(TRUE);
 # endif
index fc48a9b72347fbb1951431d04f8d1651f2e173d4..9400b20e82c401e92581e183719f1b388926735c 100644 (file)
@@ -7268,6 +7268,10 @@ open_cmdwin(void)
     /* Don't execute autocommands while creating the window. */
     block_autocmds();
 
+    // When using completion in Insert mode with <C-R>=<C-F> one can open the
+    // command line window, but we don't want the popup menu then.
+    pum_undisplay();
+
     /* don't use a new tab page */
     cmdmod.tab = 0;
     cmdmod.noswapfile = 1;
index f33f85090d6669d3516e5c22ea6482c3eb53779c..0aa15d72ebb1c3cc45705cdc66014f7f71080734 100644 (file)
@@ -791,6 +791,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    792,
 /**/
     791,
 /**/