refactor(redraw): no type argument in update_screen()

This was used in the past with assumption that curwin/curbuf
is "special" but this has not been true since basically forever
at this point.

Reduce NOT_VALID/CLEAR panic in options.lua . These should not
be set if an effect of the option is causing something
which by itself invokes redraw_later().
This commit is contained in:
bfredl
2022-09-26 15:17:10 +02:00
parent 1f2ded459a
commit 6679687bb3
21 changed files with 60 additions and 99 deletions

View File

@@ -254,7 +254,7 @@ void do_exmode(void)
RedrawingDisabled--;
no_wait_return--;
redraw_all_later(UPD_NOT_VALID);
update_screen(UPD_NOT_VALID);
update_screen();
need_wait_return = false;
msg_scroll = save_msg_scroll;
}
@@ -6090,9 +6090,10 @@ static void ex_redraw(exarg_T *eap)
if (eap->forceit) {
redraw_all_later(UPD_NOT_VALID);
redraw_cmdline = true;
} else if (VIsual_active) {
redraw_curbuf_later(UPD_INVERTED);
}
update_screen(eap->forceit ? UPD_NOT_VALID
: VIsual_active ? UPD_INVERTED : 0);
update_screen();
if (need_maketitle) {
maketitle();
}
@@ -6132,7 +6133,10 @@ static void ex_redrawstatus(exarg_T *eap)
if (State & MODE_CMDLINE) {
redraw_statuslines();
} else {
update_screen(VIsual_active ? UPD_INVERTED : 0);
if (VIsual_active) {
redraw_curbuf_later(UPD_INVERTED);
}
update_screen();
}
RedrawingDisabled = r;
p_lz = p;