Mercurial > vim
diff src/ex_cmds.c @ 17767:c75da1064e33 v8.1.1880
patch 8.1.1880: cannot show extra info for completion in a popup window
commit https://github.com/vim/vim/commit/576a4a6ff14da876d7c4418e5f27e926fcfa8d2a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 18 15:25:17 2019 +0200
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'.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 18 Aug 2019 15:30:06 +0200 |
parents | 9efb4dda9720 |
children | 0f7ae8010787 |
line wrap: on
line diff
--- 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;