Problem: Missing index entry and option menu for 'completepopup'.
Solution: Add the entries. Adjust #ifdefs to avoid dead code.
-*quickref.txt* For Vim version 8.1. Last change: 2019 Aug 01
+*quickref.txt* For Vim version 8.1. Last change: 2019 Aug 20
VIM REFERENCE MANUAL by Bram Moolenaar
'complete' 'cpt' specify how Insert mode completion works
'completefunc' 'cfu' function to be used for Insert mode completion
'completeopt' 'cot' options for Insert mode completion
+'completepopup' 'cpp' options for the Insert mode completion info popup
'completeslash' 'csl' like 'shellslash' for completion
'concealcursor' 'cocu' whether concealable text is hidden in cursor line
'conceallevel' 'cole' whether concealable text is shown or hidden
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2019 Aug 01
+" Last Change: 2019 Aug 20
" If there already is an option window, jump to that one.
let buf = bufnr('option-window')
call <SID>OptionL("cpt")
call append("$", "completeopt\twhether to use a popup menu for Insert mode completion")
call <SID>OptionG("cot", &cot)
+ if exists("+completepopup")
+ call append("$", "completepopup\toptions for the Insert mode completion info popup")
+ call <SID>OptionG("cpp", &cpp)
+ endif
call append("$", "pumheight\tmaximum height of the popup menu")
call <SID>OptionG("ph", &ph)
call append("$", "pumwidth\tminimum width of the popup menu")
#endif
SCTX_INIT},
{"completepopup", "cpp", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
-#ifdef FEAT_TEXT_PROP
+#if defined(FEAT_TEXT_PROP) && defined(FEAT_QUICKFIX)
(char_u *)&p_cpp, PV_NONE,
{(char_u *)"", (char_u *)0L}
#else
if (parse_previewpopup(NULL) == FAIL)
errmsg = e_invarg;
}
+# ifdef FEAT_QUICKFIX
// 'completepopup'
else if (varp == &p_cpp)
{
if (parse_completepopup(NULL) == FAIL)
errmsg = e_invarg;
}
+# endif
#endif
/* Options that are a list of flags. */
#endif
EXTERN int p_gd; // 'gdefault'
#ifdef FEAT_TEXT_PROP
+# ifdef FEAT_QUICKFIX
EXTERN char_u *p_cpp; // 'completepopup'
+# endif
EXTERN char_u *p_pvp; // 'previewpopup'
#endif
#ifdef FEAT_PRINTER
static int
parse_popup_option(win_T *wp, int is_preview)
{
- char_u *p;
+ char_u *p =
+#ifdef FEAT_QUICKFIX
+ !is_preview ? p_cpp :
+#endif
+ p_pvp;
- for (p = is_preview ? p_pvp : p_cpp; *p != NUL; p += (*p == ',' ? 1 : 0))
+ for ( ; *p != NUL; p += (*p == ',' ? 1 : 0))
{
char_u *e, *dig;
char_u *s = p;
parse_previewpopup(wp);
popup_set_wantpos_cursor(wp, wp->w_minwidth);
}
+# ifdef FEAT_QUICKFIX
if (type == TYPE_INFO)
{
wp->w_popup_pos = POPPOS_TOPLEFT;
add_border_left_right_padding(wp);
parse_completepopup(wp);
}
+# endif
for (i = 0; i < 4; ++i)
VIM_CLEAR(wp->w_border_highlight[i]);
return wp->w_popup_flags != 0;
}
+#if defined(FEAT_QUICKFIX) || defined(PROTO)
/*
* Find an existing popup used as the info window, in the current tab page.
* Return NULL if not found.
return wp;
return NULL;
}
+#endif
void
f_popup_getpreview(typval_T *argvars UNUSED, typval_T *rettv)
return OK;
}
+#if defined(FEAT_QUICKFIX) || defined(PROTO)
void
popup_close_preview(int info)
{
popup_close_and_callback(wp, &res);
}
}
+#endif
/*
* Set the title of the popup window to the file name.
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1892,
/**/
1891,
/**/