summaryrefslogtreecommitdiff
path: root/src/popupmenu.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-04-27 20:06:57 +0200
committerBram Moolenaar <Bram@vim.org>2021-04-27 20:06:57 +0200
commitb80d2fb0e7b9adec4cff1bc4e2d30635cb70502e (patch)
treee1f9ec44dcb05372ea01a3ec659ebd0bf8207b7f /src/popupmenu.c
parentb06b50dfa06e1cbefd634e2735e7cd5ddd5b911c (diff)
downloadvim-git-b80d2fb0e7b9adec4cff1bc4e2d30635cb70502e.tar.gz
patch 8.2.2815: status line flickers when redrawing popup menu infov8.2.2815
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)
Diffstat (limited to 'src/popupmenu.c')
-rw-r--r--src/popupmenu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/popupmenu.c b/src/popupmenu.c
index d2a73c0e0..bb1a61137 100644
--- a/src/popupmenu.c
+++ b/src/popupmenu.c
@@ -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))
{