diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-18 15:25:17 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-18 15:25:17 +0200 |
commit | 576a4a6ff14da876d7c4418e5f27e926fcfa8d2a (patch) | |
tree | 6c34c1eaed6f1b46c573bb0fe3ce8d375e678e29 /src/ex_cmds.c | |
parent | 93cf85f9ef02931de3f8c8e536a137da0b48b7dc (diff) |
patch 8.1.1880: cannot show extra info for completion in a popup windowv8.1.1880
Problem: Cannot show extra info for completion in a popup window.
Solution: Add the "popup" entry in 'completeopt'.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 282e6a0e97..77e925d4b5 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -5131,7 +5131,9 @@ free_old_sub(void) */ 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 @@ prepare_tagpreview( 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 @@ prepare_tagpreview( * 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; |