mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.2.2803: flicker when the popup menu has an info popup
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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user