diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-10-20 18:17:57 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-10-20 18:17:57 +0200 |
commit | dca7abe79cc4f0933473c3e4bcc75b46cc2c48fd (patch) | |
tree | 577964fff695a536bc2d957889e74a2f9f087290 /src/ex_cmds.c | |
parent | 88d3d09e07dbe0e3ea450bc554e2aadc451450d2 (diff) |
patch 8.1.2192: cannot easily fill the info popup asynchronouslyv8.1.2192
Problem: Cannot easily fill the info popup asynchronously.
Solution: Add the "popuphidden" value to 'completeopt'. (closes #4924)
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 fc70e2cfef..bcff7ee716 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -4919,13 +4919,14 @@ free_old_sub(void) #if defined(FEAT_QUICKFIX) || defined(PROTO) /* * Set up for a tagpreview. + * Makes the preview window the current window. * Return TRUE when it was created. */ int prepare_tagpreview( int undo_sync, // sync undo when leaving the window int use_previewpopup, // use popup if 'previewpopup' set - int use_popup) // use other popup window + use_popup_T use_popup) // use other popup window { win_T *wp; @@ -4945,11 +4946,16 @@ prepare_tagpreview( if (wp != NULL) popup_set_wantpos_cursor(wp, wp->w_minwidth); } - else if (use_popup) + else if (use_popup != USEPOPUP_NONE) { wp = popup_find_info_window(); if (wp != NULL) - popup_show(wp); + { + if (use_popup == USEPOPUP_NORMAL) + popup_show(wp); + else + popup_hide(wp); + } } else # endif @@ -4966,8 +4972,9 @@ prepare_tagpreview( * There is no preview window open yet. Create one. */ # ifdef FEAT_TEXT_PROP - if ((use_previewpopup && *p_pvp != NUL) || use_popup) - return popup_create_preview_window(use_popup); + if ((use_previewpopup && *p_pvp != NUL) + || use_popup != USEPOPUP_NONE) + return popup_create_preview_window(use_popup != USEPOPUP_NONE); # endif if (win_split(g_do_tagpreview > 0 ? g_do_tagpreview : 0, 0) == FAIL) return FALSE; |