]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0414: Flicker when drawing window separator and pum is shown v9.2.0414
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Wed, 29 Apr 2026 15:58:42 +0000 (15:58 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 29 Apr 2026 15:58:42 +0000 (15:58 +0000)
Problem:  In a vertical split where the pum overlaps the windows vsep column,
          background draws (vsep at cursor row, status line,
          redraw_vseps, idle ins_redraw) can write into cells that are
          covered by the pum, because skip_for_popup() only protects
          those cells while pum_will_redraw is set.
Solution: In skip_for_popup(), also skip cells under a visible pum when
          the current draw is not the pum itself (screen_zindex
          POPUPMENU_ZINDEX).  Exclude the wildmenu pum (MODE_CMDLINE):
          while the cmdline grows, pum_row is briefly stale and
          protecting those cells would blank a cell of the wrapped
          cmdline row (Yasuhiro Matsumoto).

closes: #20093

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/screen.c
src/version.c

index 3798de88fd28188027ad7c0e66b0ffc1c0760893..5dfaed93c1295844a77916922cca69239d44b50c 100644 (file)
@@ -445,6 +445,21 @@ skip_for_popup(int row, int col)
 #endif
            )
        return TRUE;
+    // Protect cells under the pum from background draws (vsep, status line).
+    // Excluded for wildmenu pum (MODE_CMDLINE): pum_row can be stale while
+    // the cmdline grows.
+#ifdef FEAT_PROP_POPUP
+    if (screen_zindex < POPUPMENU_ZINDEX
+           && pum_visible()
+           && (State & MODE_CMDLINE) == 0
+           && pum_under_menu(row, col, FALSE))
+       return TRUE;
+#else
+    if (pum_visible()
+           && (State & MODE_CMDLINE) == 0
+           && pum_under_menu(row, col, FALSE))
+       return TRUE;
+#endif
 #ifdef FEAT_PROP_POPUP
     if (blocked_by_popup(row, col))
        return TRUE;
index 824a80de9c9253f46b22e8cf9624dd89e2586a1b..08ebffbb594e39393ac19f915043243a77ec6155 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    414,
 /**/
     413,
 /**/