// hit-enter prompt.
static int start_message_win_timer = FALSE;
+static int popup_on_cmdline = FALSE;
+
static void may_start_message_win_timer(win_T *wp);
#endif
win_T *wp = popup_find_info_window();
if (wp != NULL)
+ {
+ popup_on_cmdline = wp->w_popup_flags & POPF_ON_CMDLINE;
popup_hide(wp);
+ }
+}
+
+/*
+ * Returns TRUE if a popup extends into the cmdline area.
+ */
+ int
+popup_overlaps_cmdline(void)
+{
+ return popup_on_cmdline;
}
/*
{
redraw_cmdline = TRUE;
if (start_col == 0 && end_col == Columns
- && c1 == ' ' && c2 == ' ' && attr == 0)
+ && c1 == ' ' && c2 == ' ' && attr == 0
+#ifdef FEAT_PROP_POPUP
+ && !popup_overlaps_cmdline()
+#endif
+ )
clear_cmdline = FALSE; // command line has been cleared
if (start_col == 0)
mode_displayed = FALSE; // mode cleared or overwritten
--- /dev/null
+|f+0&#ffffff0|o@1|b|a|r| @68
+|f|o@1|b|a|r| @68
+|f|o@1|b|a|r| @68
+|f|o@1|b|a|r| @68
+|f|o@1|b|a|r| @68
+|f|o@1|b|a|r| @68
+|f|o@1|b|a|r| @68
+|f|o@1|b|a|r| @68
+|o+0#0000001#ffd7ff255|n|e| @11| +0#0000000#ffffff0@59
+|t+0#0000001#ffd7ff255|w|o| @11| +0#0000000#ffffff0@59
+|t+0#0000001#ffd7ff255|h|r|e@1| @9| +0#0000000#ffffff0@59
+|f+0#0000001#ffd7ff255|o|u|r| @10| +0#0000000#ffffff0@59
+|f+0#0000001#e0e0e08|i|v|e| @11|o|n|e| @2| +0#0000000#ffffff0@52
+|f|i|v|e> @10| +0#0000001#e0e0e08|t|w|o| @2| +0#0000000#ffffff0@52
+|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@2| +0#0000001#e0e0e08|t|h|r|e@1| | +0#0000000#ffffff0@34|1|6|,|1| @9|B|o|t|
" clean up
call StopVimInTerminal(buf)
+
+ let lines =<< trim END
+ set completeopt=menuone,noinsert,noselect,popup,fuzzy
+ set completepopup=border:off
+ let g:list = [
+ \ {"word": "one", "info": "one\ntwo\nthree\nfour\nfive"},
+ \ {"word": "two", "info": "one\ntwo\nthree\nfour\nfive"},
+ \ {"word": "three", "info": "one\ntwo\nthree\nfour\nfive"},
+ \ {"word": "four", "info": "one\ntwo\nthree\nfour\nfive"},
+ \ {"word": "five", "info": "one\ntwo\nthree\nfour\nfive"}
+ \ ]
+ call setline(1, repeat(['foobar'], &lines))
+ inoremap <f5> <cmd>call complete(1, g:list)<cr>
+ END
+ call writefile(lines, 'XtestPopup_win3', 'D')
+ let buf = RunVimInTerminal('-S XtestPopup_win3', #{rows: 15})
+ call term_sendkeys(buf, "Go\<F5>\<C-N>\<C-N>\<C-N>\<C-N>\<C-N>")
+ call term_wait(buf, 100)
+ call VerifyScreenDump(buf, 'Test_info_popupwin_clears_cmdline_on_hide_01', {})
+
+ call term_sendkeys(buf, "\<Esc>")
+ call term_wait(buf, 500)
+ call VerifyScreenDump(buf, 'Test_info_popupwin_clears_cmdline_on_hide_02', {})
+
+ call StopVimInTerminal(buf)
endfunc
" vim: shiftwidth=2 sts=2