From 13608d851a0470ced30921428b3313c023d395d8 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 29 Aug 2022 15:06:50 +0100 Subject: patch 9.0.0318: clearing screen causes flicker Problem: Clearing screen causes flicker. Solution: Do not clear but redraw in more cases. Add () to "wait_return". --- src/drawscreen.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'src/drawscreen.c') diff --git a/src/drawscreen.c b/src/drawscreen.c index a0801e5865..e90da5f942 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -1930,24 +1930,9 @@ win_update(win_T *wp) } } - // When starting redraw in the first line, redraw all lines. When - // there is only one window it's probably faster to clear the screen - // first. + // When starting redraw in the first line, redraw all lines. if (mid_start == 0) - { mid_end = wp->w_height; - if (ONE_WINDOW && !WIN_IS_POPUP(wp)) - { - // Clear the screen when it was not done by win_del_lines() or - // win_ins_lines() above, "screen_cleared" is FALSE or MAYBE - // then. - if (screen_cleared != TRUE) - screenclear(); - // The screen was cleared, redraw the tab pages line. - if (redraw_tabline) - draw_tabline(); - } - } // When win_del_lines() or win_ins_lines() caused the screen to be // cleared (only happens for the first window) or when screenclear() @@ -3183,7 +3168,7 @@ redraw_later_clear(void) } /* - * Mark all windows to be redrawn later. + * Mark all windows to be redrawn later. Except popup windows. */ void redraw_all_later(int type) @@ -3196,6 +3181,20 @@ redraw_all_later(int type) set_must_redraw(type); } +#if 0 // not actually used yet, it probably should +/* + * Mark all windows, including popup windows, to be redrawn. + */ + void +redraw_all_windows_later(int type) +{ + redraw_all_later(type); +#ifdef FEAT_PROP_POPUP + popup_redraw_all(); // redraw all popup windows +#endif +} +#endif + /* * Set "must_redraw" to "type" unless it already has a higher value * or it is currently not allowed. -- cgit v1.2.3