Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
18395:dbfbbb32cf07 | 18396:ba5d8c5d77d7 |
---|---|
4917 #endif | 4917 #endif |
4918 | 4918 |
4919 #if defined(FEAT_QUICKFIX) || defined(PROTO) | 4919 #if defined(FEAT_QUICKFIX) || defined(PROTO) |
4920 /* | 4920 /* |
4921 * Set up for a tagpreview. | 4921 * Set up for a tagpreview. |
4922 * Makes the preview window the current window. | |
4922 * Return TRUE when it was created. | 4923 * Return TRUE when it was created. |
4923 */ | 4924 */ |
4924 int | 4925 int |
4925 prepare_tagpreview( | 4926 prepare_tagpreview( |
4926 int undo_sync, // sync undo when leaving the window | 4927 int undo_sync, // sync undo when leaving the window |
4927 int use_previewpopup, // use popup if 'previewpopup' set | 4928 int use_previewpopup, // use popup if 'previewpopup' set |
4928 int use_popup) // use other popup window | 4929 use_popup_T use_popup) // use other popup window |
4929 { | 4930 { |
4930 win_T *wp; | 4931 win_T *wp; |
4931 | 4932 |
4932 # ifdef FEAT_GUI | 4933 # ifdef FEAT_GUI |
4933 need_mouse_correct = TRUE; | 4934 need_mouse_correct = TRUE; |
4943 { | 4944 { |
4944 wp = popup_find_preview_window(); | 4945 wp = popup_find_preview_window(); |
4945 if (wp != NULL) | 4946 if (wp != NULL) |
4946 popup_set_wantpos_cursor(wp, wp->w_minwidth); | 4947 popup_set_wantpos_cursor(wp, wp->w_minwidth); |
4947 } | 4948 } |
4948 else if (use_popup) | 4949 else if (use_popup != USEPOPUP_NONE) |
4949 { | 4950 { |
4950 wp = popup_find_info_window(); | 4951 wp = popup_find_info_window(); |
4951 if (wp != NULL) | 4952 if (wp != NULL) |
4952 popup_show(wp); | 4953 { |
4954 if (use_popup == USEPOPUP_NORMAL) | |
4955 popup_show(wp); | |
4956 else | |
4957 popup_hide(wp); | |
4958 } | |
4953 } | 4959 } |
4954 else | 4960 else |
4955 # endif | 4961 # endif |
4956 { | 4962 { |
4957 FOR_ALL_WINDOWS(wp) | 4963 FOR_ALL_WINDOWS(wp) |
4964 { | 4970 { |
4965 /* | 4971 /* |
4966 * There is no preview window open yet. Create one. | 4972 * There is no preview window open yet. Create one. |
4967 */ | 4973 */ |
4968 # ifdef FEAT_TEXT_PROP | 4974 # ifdef FEAT_TEXT_PROP |
4969 if ((use_previewpopup && *p_pvp != NUL) || use_popup) | 4975 if ((use_previewpopup && *p_pvp != NUL) |
4970 return popup_create_preview_window(use_popup); | 4976 || use_popup != USEPOPUP_NONE) |
4977 return popup_create_preview_window(use_popup != USEPOPUP_NONE); | |
4971 # endif | 4978 # endif |
4972 if (win_split(g_do_tagpreview > 0 ? g_do_tagpreview : 0, 0) == FAIL) | 4979 if (win_split(g_do_tagpreview > 0 ? g_do_tagpreview : 0, 0) == FAIL) |
4973 return FALSE; | 4980 return FALSE; |
4974 curwin->w_p_pvw = TRUE; | 4981 curwin->w_p_pvw = TRUE; |
4975 curwin->w_p_wfh = TRUE; | 4982 curwin->w_p_wfh = TRUE; |