comparison 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
comparison
equal deleted inserted replaced
17814:f15ace2530db 17815:9ec2526c04c5
1298 #ifdef FEAT_QUICKFIX 1298 #ifdef FEAT_QUICKFIX
1299 !is_preview ? p_cpp : 1299 !is_preview ? p_cpp :
1300 #endif 1300 #endif
1301 p_pvp; 1301 p_pvp;
1302 1302
1303 if (wp != NULL)
1304 wp->w_popup_flags &= ~POPF_INFO_MENU;
1305
1303 for ( ; *p != NUL; p += (*p == ',' ? 1 : 0)) 1306 for ( ; *p != NUL; p += (*p == ',' ? 1 : 0))
1304 { 1307 {
1305 char_u *e, *dig; 1308 char_u *e, *dig;
1306 char_u *s = p; 1309 char_u *s = p;
1307 int x; 1310 int x;
1365 wp->w_popup_border[i] = on ? 1 : 0; 1368 wp->w_popup_border[i] = on ? 1 : 0;
1366 if (off) 1369 if (off)
1367 // only show the X for close when there is a border 1370 // only show the X for close when there is a border
1368 wp->w_popup_close = POPCLOSE_NONE; 1371 wp->w_popup_close = POPCLOSE_NONE;
1369 } 1372 }
1373 }
1374 else if (STRNCMP(s, "align:", 6) == 0)
1375 {
1376 char_u *arg = s + 6;
1377 int item = STRNCMP(arg, "item", 4) == 0 && arg + 4 == p;
1378 int menu = STRNCMP(arg, "menu", 4) == 0 && arg + 4 == p;
1379
1380 if (!menu && !item)
1381 return FAIL;
1382 if (wp != NULL && menu)
1383 wp->w_popup_flags |= POPF_INFO_MENU;
1370 } 1384 }
1371 else 1385 else
1372 return FAIL; 1386 return FAIL;
1373 } 1387 }
1374 return OK; 1388 return OK;