mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 21:18:34 +00:00
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:
@@ -2634,9 +2634,8 @@ static char *set_num_option(int opt_idx, char_u *varp, long value, char *errbuf,
|
||||
/// Called after an option changed: check if something needs to be redrawn.
|
||||
void check_redraw(uint32_t flags)
|
||||
{
|
||||
// Careful: P_RCLR and P_RALL are a combination of other P_ flags
|
||||
bool doclear = (flags & P_RCLR) == P_RCLR;
|
||||
bool all = ((flags & P_RALL) == P_RALL || doclear);
|
||||
// Careful: P_RALL is a combination of other P_ flags
|
||||
bool all = (flags & P_RALL) == P_RALL;
|
||||
|
||||
if ((flags & P_RSTAT) || all) { // mark all status lines and window bars dirty
|
||||
status_redraw_all();
|
||||
@@ -2651,9 +2650,7 @@ void check_redraw(uint32_t flags)
|
||||
if (flags & P_RWINONLY) {
|
||||
redraw_later(curwin, UPD_NOT_VALID);
|
||||
}
|
||||
if (doclear) {
|
||||
redraw_all_later(UPD_CLEAR);
|
||||
} else if (all) {
|
||||
if (all) {
|
||||
redraw_all_later(UPD_NOT_VALID);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user