Skip to content

Commit

Permalink
patch 9.0.0206: redraw flags are not named specifically
Browse files Browse the repository at this point in the history
Problem:    Redraw flags are not named specifically.
Solution:   Prefix "UPD_" to the flags, for UPDate_screen().
  • Loading branch information
brammool committed Aug 14, 2022
1 parent 28c9f89 commit a4d158b
Show file tree
Hide file tree
Showing 64 changed files with 382 additions and 378 deletions.
2 changes: 1 addition & 1 deletion src/buffer.c
Expand Up @@ -1924,7 +1924,7 @@ enter_buffer(buf_T *buf)
curbuf->b_last_used = vim_time();
#endif

redraw_later(NOT_VALID);
redraw_later(UPD_NOT_VALID);
}

#if defined(FEAT_AUTOCHDIR) || defined(PROTO)
Expand Down
20 changes: 10 additions & 10 deletions src/change.c
Expand Up @@ -559,8 +559,8 @@ changed_common(
linenr_T last = lnume + xtra - 1; // last line after the change
#endif
// Mark this window to be redrawn later.
if (wp->w_redr_type < VALID)
wp->w_redr_type = VALID;
if (wp->w_redr_type < UPD_VALID)
wp->w_redr_type = UPD_VALID;

// Check if a change in the buffer has invalidated the cached
// values for the cursor.
Expand Down Expand Up @@ -648,18 +648,18 @@ changed_common(
if (wp->w_p_rnu && xtra != 0)
{
wp->w_last_cursor_lnum_rnu = 0;
redraw_win_later(wp, VALID);
redraw_win_later(wp, UPD_VALID);
}
#ifdef FEAT_SYN_HL
// Cursor line highlighting probably need to be updated with
// "VALID" if it's below the change.
// "UPD_VALID" if it's below the change.
// If the cursor line is inside the change we need to redraw more.
if (wp->w_p_cul)
{
if (xtra == 0)
redraw_win_later(wp, VALID);
redraw_win_later(wp, UPD_VALID);
else if (lnum <= wp->w_last_cursorline)
redraw_win_later(wp, SOME_VALID);
redraw_win_later(wp, UPD_SOME_VALID);
}
#endif
}
Expand All @@ -671,8 +671,8 @@ changed_common(

// Call update_screen() later, which checks out what needs to be redrawn,
// since it notices b_mod_set and then uses b_mod_*.
if (must_redraw < VALID)
must_redraw = VALID;
if (must_redraw < UPD_VALID)
must_redraw = UPD_VALID;

// when the cursor line is changed always trigger CursorMoved
if (lnum <= curwin->w_cursor.lnum
Expand Down Expand Up @@ -724,7 +724,7 @@ changed_bytes(linenr_T lnum, colnr_T col)
FOR_ALL_WINDOWS(wp)
if (wp->w_p_diff && wp != curwin)
{
redraw_win_later(wp, VALID);
redraw_win_later(wp, UPD_VALID);
wlnum = diff_lnum_win(lnum, wp);
if (wlnum > 0)
changedOneline(wp->w_buffer, wlnum);
Expand Down Expand Up @@ -869,7 +869,7 @@ changed_lines(
FOR_ALL_WINDOWS(wp)
if (wp->w_p_diff && wp != curwin)
{
redraw_win_later(wp, VALID);
redraw_win_later(wp, UPD_VALID);
wlnum = diff_lnum_win(lnum, wp);
if (wlnum > 0)
changed_lines_buf(wp->w_buffer, wlnum,
Expand Down
2 changes: 1 addition & 1 deletion src/channel.c
Expand Up @@ -2930,7 +2930,7 @@ append_to_buffer(buf_T *buffer, char_u *msg, channel_T *channel, ch_part_T part)
}
}
}
redraw_buf_and_status_later(buffer, VALID);
redraw_buf_and_status_later(buffer, UPD_VALID);
channel_need_redraw = TRUE;
}

Expand Down
4 changes: 2 additions & 2 deletions src/clipboard.c
Expand Up @@ -147,7 +147,7 @@ clip_own_selection(Clipboard_T *cbd)
&& (cbd == &clip_star ? clip_isautosel_star()
: clip_isautosel_plus())
&& HL_ATTR(HLF_V) != HL_ATTR(HLF_VNC))
redraw_curbuf_later(INVERTED_ALL);
redraw_curbuf_later(UPD_INVERTED_ALL);
}
}
#else
Expand Down Expand Up @@ -202,7 +202,7 @@ clip_lose_selection(Clipboard_T *cbd)
&& HL_ATTR(HLF_V) != HL_ATTR(HLF_VNC)
&& !exiting)
{
update_curbuf(INVERTED_ALL);
update_curbuf(UPD_INVERTED_ALL);
setcursor();
cursor_on();
out_flush_cursor(TRUE, FALSE);
Expand Down
2 changes: 1 addition & 1 deletion src/cmdexpand.c
Expand Up @@ -3654,7 +3654,7 @@ wildmenu_cleanup(cmdline_info_T *cclp)
p_ls = save_p_ls;
p_wmh = save_p_wmh;
last_status(FALSE);
update_screen(VALID); // redraw the screen NOW
update_screen(UPD_VALID); // redraw the screen NOW
redrawcmd();
save_p_ls = -1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/debugger.c
Expand Up @@ -285,7 +285,7 @@ do_debug(char_u *cmd)

--RedrawingDisabled;
--no_wait_return;
redraw_all_later(NOT_VALID);
redraw_all_later(UPD_NOT_VALID);
need_wait_return = FALSE;
msg_scroll = save_msg_scroll;
lines_left = Rows - 1;
Expand Down
8 changes: 4 additions & 4 deletions src/diff.c
Expand Up @@ -123,7 +123,7 @@ diff_buf_delete(buf_T *buf)
// don't redraw right away, more might change or buffer state
// is invalid right now
need_diff_redraw = TRUE;
redraw_later(VALID);
redraw_later(UPD_VALID);
}
}
}
Expand Down Expand Up @@ -683,7 +683,7 @@ diff_redraw(
if (!wp->w_p_diff || !buf_valid(wp->w_buffer))
continue;

redraw_win_later(wp, SOME_VALID);
redraw_win_later(wp, UPD_SOME_VALID);
if (wp != curwin)
wp_other = wp;
#ifdef FEAT_FOLDING
Expand Down Expand Up @@ -1336,7 +1336,7 @@ ex_diffpatch(exarg_T *eap)
#endif

// patch probably has written over the screen
redraw_later(CLEAR);
redraw_later(UPD_CLEAR);

// Delete any .orig or .rej file created.
STRCPY(buf, tmp_new);
Expand Down Expand Up @@ -1544,7 +1544,7 @@ diff_win_options(

if (addbuf)
diff_buf_add(wp->w_buffer);
redraw_win_later(wp, NOT_VALID);
redraw_win_later(wp, UPD_NOT_VALID);
}

/*
Expand Down
6 changes: 4 additions & 2 deletions src/digraph.c
Expand Up @@ -2025,8 +2025,10 @@ listdigraphs(int use_headers)
ui_breakcheck();
++dp;
}
must_redraw = CLEAR; // clear screen, because some digraphs may be
// wrong, in which case we messed up ScreenLines

// clear screen, because some digraphs may be wrong, in which case we
// messed up ScreenLines
must_redraw = UPD_CLEAR;
}

static void
Expand Down

0 comments on commit a4d158b

Please sign in to comment.