0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.0792: bad display if opening cmdline window from Insert completion

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)
This commit is contained in:
Bram Moolenaar
2019-01-22 22:08:09 +01:00
parent 563bbeabcc
commit 9e26f7d31f
3 changed files with 12 additions and 1 deletions

View File

@@ -8537,6 +8537,7 @@ ins_reg(void)
++no_u_sync; ++no_u_sync;
if (regname == '=') if (regname == '=')
{ {
pos_T curpos = curwin->w_cursor;
# ifdef HAVE_INPUT_METHOD # ifdef HAVE_INPUT_METHOD
int im_on = im_get_status(); int im_on = im_get_status();
# endif # endif
@@ -8545,8 +8546,12 @@ ins_reg(void)
u_sync_once = 2; u_sync_once = 2;
regname = get_expr_register(); regname = get_expr_register();
// Cursor may be moved back a column.
curwin->w_cursor = curpos;
check_cursor();
# ifdef HAVE_INPUT_METHOD # ifdef HAVE_INPUT_METHOD
/* Restore the Input Method. */ // Restore the Input Method.
if (im_on) if (im_on)
im_set_active(TRUE); im_set_active(TRUE);
# endif # endif

View File

@@ -7268,6 +7268,10 @@ open_cmdwin(void)
/* Don't execute autocommands while creating the window. */ /* Don't execute autocommands while creating the window. */
block_autocmds(); 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 */ /* don't use a new tab page */
cmdmod.tab = 0; cmdmod.tab = 0;
cmdmod.noswapfile = 1; cmdmod.noswapfile = 1;

View File

@@ -791,6 +791,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
792,
/**/ /**/
791, 791,
/**/ /**/