patch 8.1.1880: cannot show extra info for completion in a popup window
Problem: Cannot show extra info for completion in a popup window.
Solution: Add the "popup" entry in 'completeopt'.
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 282e6a0..77e925d 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -5131,7 +5131,9 @@
*/
int
prepare_tagpreview(
- int undo_sync) /* sync undo when leaving the window */
+ int undo_sync, // sync undo when leaving the window
+ int use_previewpopup, // use popup if 'previewpopup' set
+ int use_popup) // use other popup window
{
win_T *wp;
@@ -5145,11 +5147,16 @@
if (!curwin->w_p_pvw)
{
# ifdef FEAT_TEXT_PROP
- if (*p_pvp != NUL)
+ if (use_previewpopup && *p_pvp != NUL)
{
wp = popup_find_preview_window();
if (wp != NULL)
- popup_set_wantpos(wp, wp->w_minwidth);
+ popup_set_wantpos_cursor(wp, wp->w_minwidth);
+ }
+ else if (use_popup)
+ {
+ wp = popup_find_info_window();
+ // TODO: set position
}
else
# endif
@@ -5166,8 +5173,8 @@
* There is no preview window open yet. Create one.
*/
# ifdef FEAT_TEXT_PROP
- if (*p_pvp != NUL)
- return popup_create_preview_window();
+ if ((use_previewpopup && *p_pvp != NUL) || use_popup)
+ return popup_create_preview_window(use_popup);
# endif
if (win_split(g_do_tagpreview > 0 ? g_do_tagpreview : 0, 0) == FAIL)
return FALSE;