diff src/popupwin.c @ 26165:7b07f361b1d4 v8.2.3614

patch 8.2.3614: zindex of popup windows not used when redrawing popup menu Commit: https://github.com/vim/vim/commit/6555500bcf280716187eea9dba22d4f69bc0a501 Author: Bakudankun <bakudankun@gmail.com> Date: Wed Nov 17 20:40:16 2021 +0000 patch 8.2.3614: zindex of popup windows not used when redrawing popup menu Problem: zindex of popup windows not used when redrawing popup menu. Solution: Check the zindex when redrawing the popup menu. (closes https://github.com/vim/vim/issues/9129, closes #9089)
author Bram Moolenaar <Bram@vim.org>
date Wed, 17 Nov 2021 21:45:05 +0100
parents 80e69293217c
children c83460a14407
line wrap: on
line diff
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -3654,7 +3654,11 @@ may_update_popup_mask(int type)
 	    for (col = wp->w_wincol;
 		 col < wp->w_wincol + width - wp->w_popup_leftoff
 						&& col < screen_Columns; ++col)
-		if (wp->w_popup_mask_cells == NULL
+		if (wp->w_zindex < POPUPMENU_ZINDEX
+			&& pum_visible()
+			&& pum_under_menu(line, col, FALSE))
+		    mask[line * screen_Columns + col] = POPUPMENU_ZINDEX;
+		else if (wp->w_popup_mask_cells == NULL
 				|| !popup_masked(wp, width, height, col, line))
 		    mask[line * screen_Columns + col] = wp->w_zindex;
     }