]> granicus.if.org Git - vim/commitdiff
patch 8.2.2815: status line flickers when redrawing popup menu info v8.2.2815
authorBram Moolenaar <Bram@vim.org>
Tue, 27 Apr 2021 18:06:57 +0000 (20:06 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 27 Apr 2021 18:06:57 +0000 (20:06 +0200)
Problem:    Status line flickers when redrawing popup menu info.
Solution:   Do not redraw the status line when the focus is in the popup
            window. (issue #8144)

src/popupmenu.c
src/version.c

index d2a73c0e0e9aed219ee4a8ce2a845e2b6f2aa833..bb1a611377a355df4a8daf087e290a0ef85add05 100644 (file)
@@ -925,6 +925,8 @@ pum_set_selected(int n, int repeat UNUSED)
                            || (curtab != curtab_save
                                                && valid_tabpage(curtab_save)))
                    {
+                       int save_redr_status;
+
                        if (curtab != curtab_save && valid_tabpage(curtab_save))
                            goto_tabpage_tp(curtab_save, FALSE, FALSE);
 
@@ -953,13 +955,20 @@ pum_set_selected(int n, int repeat UNUSED)
                        // Update the screen before drawing the popup menu.
                        // Enable updating the status lines.
                        pum_pretend_not_visible = TRUE;
+
                        // But don't draw text at the new popup menu position,
                        // it causes flicker.  When resizing we need to draw
                        // anyway, the position may change later.
+                       // Also do not redraw the status line of the original
+                       // current window here, to avoid it gets drawn with
+                       // StatusLineNC for a moment and cause flicker.
                        pum_will_redraw = !resized;
+                       save_redr_status = curwin_save->w_redr_status;
+                       curwin_save->w_redr_status = FALSE;
                        update_screen(0);
                        pum_pretend_not_visible = FALSE;
                        pum_will_redraw = FALSE;
+                       curwin_save->w_redr_status = save_redr_status;
 
                        if (!resized && win_valid(curwin_save))
                        {
index d1ece1191db28559322e4d545037e7ef94141c5b..a399369b504a93de4edab1287872b0a732bcf8a1 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2815,
 /**/
     2814,
 /**/