1
0
forked from aniani/vim

patch 8.1.1904: cannot have an info popup align with the popup menu

Problem:    Cannot have an info popup align with the popup menu.
Solution:   Add the "align" item to 'completepopup'.
This commit is contained in:
Bram Moolenaar
2019-08-21 17:29:29 +02:00
parent 9cb698d564
commit 258cef59d8
9 changed files with 116 additions and 1 deletions

View File

@@ -1300,6 +1300,9 @@ parse_popup_option(win_T *wp, int is_preview)
#endif
p_pvp;
if (wp != NULL)
wp->w_popup_flags &= ~POPF_INFO_MENU;
for ( ; *p != NUL; p += (*p == ',' ? 1 : 0))
{
char_u *e, *dig;
@@ -1368,6 +1371,17 @@ parse_popup_option(win_T *wp, int is_preview)
wp->w_popup_close = POPCLOSE_NONE;
}
}
else if (STRNCMP(s, "align:", 6) == 0)
{
char_u *arg = s + 6;
int item = STRNCMP(arg, "item", 4) == 0 && arg + 4 == p;
int menu = STRNCMP(arg, "menu", 4) == 0 && arg + 4 == p;
if (!menu && !item)
return FAIL;
if (wp != NULL && menu)
wp->w_popup_flags |= POPF_INFO_MENU;
}
else
return FAIL;
}