Mercurial > vim
diff src/popupwin.c @ 17815:9ec2526c04c5 v8.1.1904
patch 8.1.1904: cannot have an info popup align with the popup menu
Commit: https://github.com/vim/vim/commit/258cef59d8c53a5b1c04937c826dc133ad5710e2
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 21 17:29:29 2019 +0200
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'.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 21 Aug 2019 17:30:03 +0200 |
parents | b5499bf22a97 |
children | e8a7029efa40 |
line wrap: on
line diff
--- a/src/popupwin.c +++ b/src/popupwin.c @@ -1300,6 +1300,9 @@ parse_popup_option(win_T *wp, int is_pre #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_pre 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; }