Patch 9.0.0316
Problem: Screen flickers when 'cmdheight' is zero.
Solution: Redraw over existing text instead of clearing.
Files: src/drawscreen.c, src/ex_getln.c
*** ../vim-9.0.0315/src/drawscreen.c 2022-08-28 23:36:46.991446894 +0100
--- src/drawscreen.c 2022-08-29 12:36:47.532268366 +0100
***************
*** 170,207 ****
if (msg_scrolled)
{
clear_cmdline = TRUE;
! if (msg_scrolled > Rows - 5) // clearing is faster
! type = UPD_CLEAR;
! else if (type != UPD_CLEAR)
{
! check_for_delay(FALSE);
! if (screen_ins_lines(0, 0, msg_scrolled, (int)Rows, 0, NULL)
! == FAIL)
! type = UPD_CLEAR;
! FOR_ALL_WINDOWS(wp)
{
! if (wp->w_winrow < msg_scrolled)
{
! if (W_WINROW(wp) + wp->w_height > msg_scrolled
! && wp->w_redr_type < UPD_REDRAW_TOP
! && wp->w_lines_valid > 0
! && wp->w_topline == wp->w_lines[0].wl_lnum)
! {
! wp->w_upd_rows = msg_scrolled - W_WINROW(wp);
! wp->w_redr_type = UPD_REDRAW_TOP;
! }
! else
{
! wp->w_redr_type = UPD_NOT_VALID;
! if (W_WINROW(wp) + wp->w_height + wp->w_status_height
! <= msg_scrolled)
! wp->w_redr_status = TRUE;
}
}
}
- if (!no_update)
- redraw_cmdline = TRUE;
- redraw_tabline = TRUE;
}
msg_scrolled = 0;
need_wait_return = FALSE;
--- 170,210 ----
if (msg_scrolled)
{
clear_cmdline = TRUE;
! if (type != UPD_CLEAR)
{
! if (msg_scrolled > Rows - 5) // redrawing is faster
! type = UPD_NOT_VALID;
! else
{
! check_for_delay(FALSE);
! if (screen_ins_lines(0, 0, msg_scrolled, (int)Rows, 0, NULL)
! == FAIL)
! type = UPD_NOT_VALID;
! FOR_ALL_WINDOWS(wp)
{
! if (wp->w_winrow < msg_scrolled)
{
! if (W_WINROW(wp) + wp->w_height > msg_scrolled
! && wp->w_redr_type < UPD_REDRAW_TOP
! && wp->w_lines_valid > 0
! && wp->w_topline == wp->w_lines[0].wl_lnum)
! {
! wp->w_upd_rows = msg_scrolled - W_WINROW(wp);
! wp->w_redr_type = UPD_REDRAW_TOP;
! }
! else
! {
! wp->w_redr_type = UPD_NOT_VALID;
! if (W_WINROW(wp) + wp->w_height
! + wp->w_status_height <= msg_scrolled)
! wp->w_redr_status = TRUE;
! }
}
}
+ if (!no_update)
+ redraw_cmdline = TRUE;
+ redraw_tabline = TRUE;
}
}
msg_scrolled = 0;
need_wait_return = FALSE;
*** ../vim-9.0.0315/src/ex_getln.c 2022-08-28 17:24:59.771549204 +0100
--- src/ex_getln.c 2022-08-29 12:30:47.640865460 +0100
***************
*** 2582,2588 ****
made_cmdheight_nonzero = TRUE;
set_option_value((char_u *)"ch", 0L, NULL, 0);
// Redraw is needed for command line completion
! redraw_all_later(UPD_CLEAR);
made_cmdheight_nonzero = FALSE;
}
--- 2582,2588 ----
made_cmdheight_nonzero = TRUE;
set_option_value((char_u *)"ch", 0L, NULL, 0);
// Redraw is needed for command line completion
! redraw_all_later(UPD_NOT_VALID);
made_cmdheight_nonzero = FALSE;
}
*** ../vim-9.0.0315/src/version.c 2022-08-29 12:23:32.941653371 +0100
--- src/version.c 2022-08-29 12:38:37.244906419 +0100
***************
*** 709,710 ****
--- 709,712 ----
{ /* Add new patch number below this line */
+ /**/
+ 316,
/**/
--
I am always surprised in the Linux world how quickly solutions can be
obtained. (Imagine sending an email to Bill Gates, asking why Windows
crashed, and how to fix it... and then getting an answer that fixed the
problem... <0>_<0> !) -- Mark Langdon
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///