diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-04-23 21:01:34 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-04-23 21:01:34 +0200 |
commit | e0c03c8e107f109eadab145e18544d8e74a6976e (patch) | |
tree | 447b5b7477f4df9c2f4a7b69c9d579b52ff4183c /src/drawscreen.c | |
parent | a6aa16423fdd0518ec9f3074b0d32b1d651d41e8 (diff) |
patch 8.2.2803: flicker when the popup menu has an info popupv8.2.2803
Problem: Flicker when the popup menu has an info popup.
Solution: Avoid drawing over the popup when it's going to be redrawn in the
same position. (closes #8131) Also avoid redrawing the scrollbar.
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r-- | src/drawscreen.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c index 4a716b29de..bb0d8878e8 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -93,6 +93,7 @@ update_screen(int type_arg) int gui_cursor_row = 0; #endif int no_update = FALSE; + int save_pum_will_redraw = pum_will_redraw; // Don't do anything if the screen structures are (not yet) valid. if (!screen_valid(TRUE)) @@ -276,6 +277,11 @@ update_screen(int type_arg) } #endif + if (pum_redraw_in_same_position()) + // Avoid flicker if the popup menu is going to be redrawn in the same + // position. + pum_will_redraw = TRUE; + // Go from top to bottom through the windows, redrawing the ones that need // it. #if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_CLIPBOARD) @@ -321,7 +327,9 @@ update_screen(int type_arg) #if defined(FEAT_SEARCH_EXTRA) end_search_hl(); #endif + // May need to redraw the popup menu. + pum_will_redraw = save_pum_will_redraw; pum_may_redraw(); // Reset b_mod_set flags. Going through all windows is probably faster |