mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:9.0.0316: screen flickers when 'cmdheight' is zero (#19991)
Problem: Screen flickers when 'cmdheight' is zero.
Solution: Redraw over existing text instead of clearing.
f73e5ba56f
This commit is contained in:
parent
e6af1cf250
commit
92bc11a891
@ -469,35 +469,37 @@ int update_screen(int type)
|
||||
}
|
||||
msg_grid_set_pos(Rows - (int)p_ch, false);
|
||||
msg_grid_invalid = false;
|
||||
} else if (msg_scrolled > Rows - 5) { // clearing is faster
|
||||
type = UPD_CLEAR;
|
||||
} else if (type != UPD_CLEAR) {
|
||||
check_for_delay(false);
|
||||
grid_ins_lines(&default_grid, 0, msg_scrolled, Rows, 0, Columns);
|
||||
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
|
||||
if (wp->w_floating) {
|
||||
continue;
|
||||
}
|
||||
if (wp->w_winrow < msg_scrolled) {
|
||||
if (W_ENDROW(wp) > 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 - wp->w_winrow;
|
||||
wp->w_redr_type = UPD_REDRAW_TOP;
|
||||
} else {
|
||||
wp->w_redr_type = UPD_NOT_VALID;
|
||||
if (wp->w_winrow + wp->w_winbar_height <= msg_scrolled) {
|
||||
wp->w_redr_status = true;
|
||||
if (msg_scrolled > Rows - 5) { // redrawing is faster
|
||||
type = UPD_NOT_VALID;
|
||||
} else {
|
||||
check_for_delay(false);
|
||||
grid_ins_lines(&default_grid, 0, msg_scrolled, Rows, 0, Columns);
|
||||
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
|
||||
if (wp->w_floating) {
|
||||
continue;
|
||||
}
|
||||
if (wp->w_winrow < msg_scrolled) {
|
||||
if (W_ENDROW(wp) > 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 - wp->w_winrow;
|
||||
wp->w_redr_type = UPD_REDRAW_TOP;
|
||||
} else {
|
||||
wp->w_redr_type = UPD_NOT_VALID;
|
||||
if (wp->w_winrow + wp->w_winbar_height <= msg_scrolled) {
|
||||
wp->w_redr_status = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_stl_global && Rows - p_ch - 1 <= msg_scrolled) {
|
||||
curwin->w_redr_status = true;
|
||||
}
|
||||
redraw_cmdline = true;
|
||||
redraw_tabline = true;
|
||||
}
|
||||
if (is_stl_global && Rows - p_ch - 1 <= msg_scrolled) {
|
||||
curwin->w_redr_status = true;
|
||||
}
|
||||
redraw_cmdline = true;
|
||||
redraw_tabline = true;
|
||||
}
|
||||
msg_scrolled = 0;
|
||||
msg_scrolled_at_flush = 0;
|
||||
|
@ -918,7 +918,7 @@ theend:
|
||||
// Restore cmdheight
|
||||
set_option_value("ch", 0L, NULL, 0);
|
||||
// Redraw is needed for command line completion
|
||||
redraw_all_later(UPD_CLEAR);
|
||||
redraw_all_later(UPD_NOT_VALID);
|
||||
|
||||
made_cmdheight_nonzero = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user