Mercurial > vim
diff src/ex_cmds.c @ 18396:ba5d8c5d77d7 v8.1.2192
patch 8.1.2192: cannot easily fill the info popup asynchronously
Commit: https://github.com/vim/vim/commit/dca7abe79cc4f0933473c3e4bcc75b46cc2c48fd
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 20 18:17:57 2019 +0200
patch 8.1.2192: cannot easily fill the info popup asynchronously
Problem: Cannot easily fill the info popup asynchronously.
Solution: Add the "popuphidden" value to 'completeopt'. (closes https://github.com/vim/vim/issues/4924)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 20 Oct 2019 18:30:04 +0200 |
parents | fe5afdc03bd2 |
children | 50c0a9fb07ae |
line wrap: on
line diff
--- 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;