patch 8.1.1493: redrawing with popups is slow and causes flicker
Problem: Redrawing with popups is slow and causes flicker.
Solution: Avoid clearing and redrawing using a zindex mask.
diff --git a/src/popupmnu.c b/src/popupmnu.c
index 276d49f..09faa69 100644
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -431,6 +431,12 @@
/ (pum_size - pum_height);
}
+#ifdef FEAT_TEXT_PROP
+ // The popup menu is drawn over popup menus with zindex under
+ // POPUPMENU_ZINDEX.
+ screen_zindex = POPUPMENU_ZINDEX;
+#endif
+
for (i = 0; i < pum_height; ++i)
{
idx = i + pum_first;
@@ -611,6 +617,10 @@
++row;
}
+
+#ifdef FEAT_TEXT_PROP
+ screen_zindex = 0;
+#endif
}
/*