Mercurial > vim
diff src/drawscreen.c @ 29960:4fcf816aa806 v9.0.0318
patch 9.0.0318: clearing screen causes flicker
Commit: https://github.com/vim/vim/commit/13608d851a0470ced30921428b3313c023d395d8
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 29 15:06:50 2022 +0100
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".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 29 Aug 2022 16:15:04 +0200 |
parents | 549994614a5a |
children | 74f82d4dae9c |
line wrap: on
line diff
--- 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.