From a4d158b3c839e96ed98ff87c7b7124ff4518c4ff Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 14 Aug 2022 14:17:45 +0100 Subject: patch 9.0.0206: redraw flags are not named specifically Problem: Redraw flags are not named specifically. Solution: Prefix "UPD_" to the flags, for UPDate_screen(). --- src/buffer.c | 2 +- src/change.c | 20 +++++----- src/channel.c | 2 +- src/clipboard.c | 4 +- src/cmdexpand.c | 2 +- src/debugger.c | 2 +- src/diff.c | 8 ++-- src/digraph.c | 6 ++- src/drawscreen.c | 111 ++++++++++++++++++++++++++++--------------------------- src/edit.c | 6 +-- src/evalvars.c | 2 +- src/ex_cmds.c | 10 ++--- src/ex_docmd.c | 18 ++++----- src/ex_getln.c | 18 ++++----- src/fileio.c | 2 +- src/fold.c | 6 +-- src/getchar.c | 2 +- src/gui.c | 6 +-- src/gui_haiku.cc | 2 +- src/highlight.c | 24 ++++++------ src/if_lua.c | 10 ++--- src/if_mzsch.c | 10 ++--- src/if_perl.xs | 10 ++--- src/if_py_both.h | 10 ++--- src/if_ruby.c | 12 +++--- src/if_tcl.c | 10 ++--- src/indent.c | 6 +-- src/main.c | 6 +-- src/match.c | 10 ++--- src/memline.c | 8 ++-- src/menu.c | 2 +- src/message.c | 8 ++-- src/misc1.c | 6 +-- src/misc2.c | 2 +- src/mouse.c | 18 ++++----- src/move.c | 31 ++++++++-------- src/netbeans.c | 14 +++---- src/normal.c | 38 +++++++++---------- src/ops.c | 10 ++--- src/option.c | 22 +++++------ src/optionstr.c | 12 +++--- src/os_unix.c | 2 +- src/os_win32.c | 4 +- src/popupmenu.c | 6 +-- src/popupwin.c | 32 ++++++++-------- src/quickfix.c | 8 ++-- src/register.c | 4 +- src/screen.c | 8 ++-- src/search.c | 12 +++--- src/sign.c | 10 ++--- src/spell.c | 4 +- src/spellfile.c | 4 +- src/structs.h | 2 +- src/syntax.c | 16 ++++---- src/tag.c | 2 +- src/term.c | 20 +++++----- src/terminal.c | 28 +++++++------- src/textformat.c | 6 +-- src/textobject.c | 12 +++--- src/textprop.c | 8 ++-- src/undo.c | 2 +- src/version.c | 2 + src/vim.h | 20 +++++----- src/window.c | 40 ++++++++++---------- 64 files changed, 382 insertions(+), 378 deletions(-) (limited to 'src') diff --git a/src/buffer.c b/src/buffer.c index 669cfa9a97..1aaddd477b 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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) diff --git a/src/change.c b/src/change.c index 42d4550172..9e1c1c9188 100644 --- a/src/change.c +++ b/src/change.c @@ -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. @@ -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 } @@ -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 @@ -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); @@ -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, diff --git a/src/channel.c b/src/channel.c index 8a64d1756a..0bfeeac476 100644 --- a/src/channel.c +++ b/src/channel.c @@ -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; } diff --git a/src/clipboard.c b/src/clipboard.c index e7854d0454..e140113ff7 100644 --- a/src/clipboard.c +++ b/src/clipboard.c @@ -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 @@ -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); diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 793a104d06..ff6aa0d033 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -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; } diff --git a/src/debugger.c b/src/debugger.c index 38d1fb6022..e2f73cca03 100644 --- a/src/debugger.c +++ b/src/debugger.c @@ -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; diff --git a/src/diff.c b/src/diff.c index 43feb2a8b3..80f1eb3368 100644 --- a/src/diff.c +++ b/src/diff.c @@ -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); } } } @@ -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 @@ -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); @@ -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); } /* diff --git a/src/digraph.c b/src/digraph.c index f37292fcd1..de4ff83efb 100644 --- a/src/digraph.c +++ b/src/digraph.c @@ -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 diff --git a/src/drawscreen.c b/src/drawscreen.c index a5822b25d8..9e8d9eede1 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -28,7 +28,7 @@ * * Commands that scroll a window change w_topline and must call * check_cursor() to move the cursor into the visible part of the window, and - * call redraw_later(VALID) to have the window displayed by update_screen() + * call redraw_later(UPD_VALID) to have the window displayed by update_screen() * later. * * Commands that change text in the buffer must call changed_bytes() or @@ -40,23 +40,23 @@ * * Commands that change how a window is displayed (e.g., setting 'list') or * invalidate the contents of a window in another way (e.g., change fold - * settings), must call redraw_later(NOT_VALID) to have the whole window + * settings), must call redraw_later(UPD_NOT_VALID) to have the whole window * redisplayed by update_screen() later. * * Commands that change how a buffer is displayed (e.g., setting 'tabstop') - * must call redraw_curbuf_later(NOT_VALID) to have all the windows for the + * must call redraw_curbuf_later(UPD_NOT_VALID) to have all the windows for the * buffer redisplayed by update_screen() later. * * Commands that change highlighting and possibly cause a scroll too must call - * redraw_later(SOME_VALID) to update the whole window but still use scrolling - * to avoid redrawing everything. But the length of displayed lines must not - * change, use NOT_VALID then. + * redraw_later(UPD_SOME_VALID) to update the whole window but still use + * scrolling to avoid redrawing everything. But the length of displayed lines + * must not change, use UPD_NOT_VALID then. * - * Commands that move the window position must call redraw_later(NOT_VALID). + * Commands that move the window position must call redraw_later(UPD_NOT_VALID). * TODO: should minimize redrawing by scrolling when possible. * * Commands that change everything (e.g., resizing the screen) must call - * redraw_all_later(NOT_VALID) or redraw_all_later(CLEAR). + * redraw_all_later(UPD_NOT_VALID) or redraw_all_later(UPD_CLEAR). * * Things that are handled indirectly: * - When messages scroll the screen up, msg_scrolled will be set and @@ -99,7 +99,7 @@ update_screen(int type_arg) if (!screen_valid(TRUE)) return FAIL; - if (type == VALID_NO_UPDATE) + if (type == UPD_VALID_NO_UPDATE) { no_update = TRUE; type = 0; @@ -134,12 +134,12 @@ update_screen(int type_arg) } // May need to update w_lines[]. - if (curwin->w_lines_valid == 0 && type < NOT_VALID + if (curwin->w_lines_valid == 0 && type < UPD_NOT_VALID #ifdef FEAT_TERMINAL && !term_do_update_window(curwin) #endif ) - type = NOT_VALID; + type = UPD_NOT_VALID; // Postpone the redrawing when it's not needed and when being called // recursively. @@ -147,7 +147,7 @@ update_screen(int type_arg) { redraw_later(type); // remember type for next time must_redraw = type; - if (type > INVERTED_ALL) + if (type > UPD_INVERTED_ALL) curwin->w_lines_valid = 0; // don't use w_lines[].wl_size now return FAIL; } @@ -171,28 +171,28 @@ update_screen(int type_arg) { clear_cmdline = TRUE; if (msg_scrolled > Rows - 5) // clearing is faster - type = CLEAR; - else if (type != CLEAR) + 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 = CLEAR; + 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 < REDRAW_TOP + && 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 = REDRAW_TOP; + wp->w_redr_type = UPD_REDRAW_TOP; } else { - wp->w_redr_type = NOT_VALID; + 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; @@ -214,10 +214,10 @@ update_screen(int type_arg) if (need_highlight_changed) highlight_changed(); - if (type == CLEAR) // first clear screen + if (type == UPD_CLEAR) // first clear screen { screenclear(); // will reset clear_cmdline - type = NOT_VALID; + type = UPD_NOT_VALID; // must_redraw may be set indirectly, avoid another redraw later must_redraw = 0; } @@ -228,24 +228,24 @@ update_screen(int type_arg) #ifdef FEAT_LINEBREAK // Force redraw when width of 'number' or 'relativenumber' column // changes. - if (curwin->w_redr_type < NOT_VALID + if (curwin->w_redr_type < UPD_NOT_VALID && curwin->w_nrwidth != ((curwin->w_p_nu || curwin->w_p_rnu) ? number_width(curwin) : 0)) - curwin->w_redr_type = NOT_VALID; + curwin->w_redr_type = UPD_NOT_VALID; #endif // Only start redrawing if there is really something to do. - if (type == INVERTED) + if (type == UPD_INVERTED) update_curswant(); if (curwin->w_redr_type < type - && !((type == VALID + && !((type == UPD_VALID && curwin->w_lines[0].wl_valid #ifdef FEAT_DIFF && curwin->w_topfill == curwin->w_old_topfill && curwin->w_botfill == curwin->w_old_botfill #endif && curwin->w_topline == curwin->w_lines[0].wl_lnum) - || (type == INVERTED + || (type == UPD_INVERTED && VIsual_active && curwin->w_old_cursor_lnum == curwin->w_cursor.lnum && curwin->w_old_visual_mode == VIsual_mode @@ -255,7 +255,7 @@ update_screen(int type_arg) curwin->w_redr_type = type; // Redraw the tab pages line if needed. - if (redraw_tabline || type >= NOT_VALID) + if (redraw_tabline || type >= UPD_NOT_VALID) draw_tabline(); #ifdef FEAT_SYN_HL @@ -1408,12 +1408,13 @@ fold_line( * * How the window is redrawn depends on wp->w_redr_type. Each type also * implies the one below it. - * NOT_VALID redraw the whole window - * SOME_VALID redraw the whole window but do scroll when possible - * REDRAW_TOP redraw the top w_upd_rows window lines, otherwise like VALID - * INVERTED redraw the changed part of the Visual area - * INVERTED_ALL redraw the whole Visual area - * VALID 1. scroll up/down to adjust for a changed w_topline + * UPD_NOT_VALID redraw the whole window + * UPD_SOME_VALID redraw the whole window but do scroll when possible + * UPD_REDRAW_TOP redraw the top w_upd_rows window lines, otherwise like + * UPD_VALID + * UPD_INVERTED redraw the changed part of the Visual area + * UPD_INVERTED_ALL redraw the whole Visual area + * UPD_VALID 1. scroll up/down to adjust for a changed w_topline * 2. update lines at the top when scrolled down * 3. redraw changed text: * - if wp->w_buffer->b_mod_set set, update lines between @@ -1500,7 +1501,7 @@ win_update(win_T *wp) type = wp->w_redr_type; - if (type == NOT_VALID) + if (type == UPD_NOT_VALID) { wp->w_redr_status = TRUE; wp->w_lines_valid = 0; @@ -1552,7 +1553,7 @@ win_update(win_T *wp) i = (wp->w_p_nu || wp->w_p_rnu) ? number_width(wp) : 0; if (wp->w_nrwidth != i) { - type = NOT_VALID; + type = UPD_NOT_VALID; wp->w_nrwidth = i; } else @@ -1563,7 +1564,7 @@ win_update(win_T *wp) // When there are both inserted/deleted lines and specific lines to be // redrawn, w_redraw_top and w_redraw_bot may be invalid, just redraw // everything (only happens when redrawing is off for while). - type = NOT_VALID; + type = UPD_NOT_VALID; } else { @@ -1705,7 +1706,7 @@ win_update(win_T *wp) // When only displaying the lines at the top, set top_end. Used when // window has scrolled down for msg_scrolled. - if (type == REDRAW_TOP) + if (type == UPD_REDRAW_TOP) { j = 0; for (i = 0; i < wp->w_lines_valid; ++i) @@ -1719,10 +1720,10 @@ win_update(win_T *wp) } if (top_end == 0) // not found (cannot happen?): redraw everything - type = NOT_VALID; + type = UPD_NOT_VALID; else - // top area defined, the rest is VALID - type = VALID; + // top area defined, the rest is UPD_VALID + type = UPD_VALID; } // Trick: we want to avoid clearing the screen twice. screenclear() will @@ -1738,8 +1739,8 @@ win_update(win_T *wp) // 2: wp->w_topline is below wp->w_lines[0].wl_lnum: may scroll up // 3: wp->w_topline is wp->w_lines[0].wl_lnum: find first entry in // w_lines[] that needs updating. - if ((type == VALID || type == SOME_VALID - || type == INVERTED || type == INVERTED_ALL) + if ((type == UPD_VALID || type == UPD_SOME_VALID + || type == UPD_INVERTED || type == UPD_INVERTED_ALL) #ifdef FEAT_DIFF && !wp->w_botfill && !wp->w_old_botfill #endif @@ -1942,35 +1943,35 @@ win_update(win_T *wp) // When win_del_lines() or win_ins_lines() caused the screen to be // cleared (only happens for the first window) or when screenclear() // was called directly above, "must_redraw" will have been set to - // NOT_VALID, need to reset it here to avoid redrawing twice. + // UPD_NOT_VALID, need to reset it here to avoid redrawing twice. if (screen_cleared == TRUE) must_redraw = 0; } else { - // Not VALID or INVERTED: redraw all lines. + // Not UPD_VALID or UPD_INVERTED: redraw all lines. mid_start = 0; mid_end = wp->w_height; } - if (type == SOME_VALID) + if (type == UPD_SOME_VALID) { - // SOME_VALID: redraw all lines. + // UPD_SOME_VALID: redraw all lines. mid_start = 0; mid_end = wp->w_height; - type = NOT_VALID; + type = UPD_NOT_VALID; } // check if we are updating or removing the inverted part if ((VIsual_active && buf == curwin->w_buffer) - || (wp->w_old_cursor_lnum != 0 && type != NOT_VALID)) + || (wp->w_old_cursor_lnum != 0 && type != UPD_NOT_VALID)) { linenr_T from, to; if (VIsual_active) { if (VIsual_mode != wp->w_old_visual_mode - || type == INVERTED_ALL) + || type == UPD_INVERTED_ALL) { // If the type of Visual selection changed, redraw the whole // selection. Also when the ownership of the X selection is @@ -3114,7 +3115,7 @@ redraw_after_callback(int call_update_screen, int do_message) validate_cursor(); // keep the command line if possible - update_screen(VALID_NO_UPDATE); + update_screen(UPD_VALID_NO_UPDATE); setcursor(); if (msg_scrolled == 0) @@ -3140,7 +3141,7 @@ redraw_after_callback(int call_update_screen, int do_message) /* * Redraw the current window later, with update_screen(type). * Set must_redraw only if not already set to a higher value. - * E.g. if must_redraw is CLEAR, type NOT_VALID will do nothing. + * E.g. if must_redraw is UPD_CLEAR, type UPD_NOT_VALID will do nothing. */ void redraw_later(int type) @@ -3156,7 +3157,7 @@ redraw_win_later( if (!exiting && wp->w_redr_type < type) { wp->w_redr_type = type; - if (type >= NOT_VALID) + if (type >= UPD_NOT_VALID) wp->w_lines_valid = 0; if (must_redraw < type) // must_redraw is the maximum of all windows must_redraw = type; @@ -3170,7 +3171,7 @@ redraw_win_later( void redraw_later_clear(void) { - redraw_all_later(CLEAR); + redraw_all_later(UPD_CLEAR); reset_screen_attr(); } @@ -3263,7 +3264,7 @@ status_redraw_all(void) if (wp->w_status_height) { wp->w_redr_status = TRUE; - redraw_later(VALID); + redraw_later(UPD_VALID); } } @@ -3279,7 +3280,7 @@ status_redraw_curbuf(void) if (wp->w_status_height != 0 && wp->w_buffer == curbuf) { wp->w_redr_status = TRUE; - redraw_later(VALID); + redraw_later(UPD_VALID); } } @@ -3339,5 +3340,5 @@ redrawWinline( wp->w_redraw_top = lnum; if (wp->w_redraw_bot == 0 || wp->w_redraw_bot < lnum) wp->w_redraw_bot = lnum; - redraw_win_later(wp, VALID); + redraw_win_later(wp, UPD_VALID); } diff --git a/src/edit.c b/src/edit.c index c3aa888780..0b0d174f36 100644 --- a/src/edit.c +++ b/src/edit.c @@ -4701,7 +4701,7 @@ ins_up( || old_topfill != curwin->w_topfill #endif ) - redraw_later(VALID); + redraw_later(UPD_VALID); start_arrow(&tpos); can_cindent = TRUE; } @@ -4758,7 +4758,7 @@ ins_down( || old_topfill != curwin->w_topfill #endif ) - redraw_later(VALID); + redraw_later(UPD_VALID); start_arrow(&tpos); can_cindent = TRUE; } @@ -5283,7 +5283,7 @@ ins_ctrl_ey(int tc) scrolldown_clamp(); else scrollup_clamp(); - redraw_later(VALID); + redraw_later(UPD_VALID); } else { diff --git a/src/evalvars.c b/src/evalvars.c index 16dfd0d126..0b51ce1da0 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -3827,7 +3827,7 @@ set_var_const( else if (STRCMP(varname, "hlsearch") == 0) { no_hlsearch = !di->di_tv.vval.v_number; - redraw_all_later(SOME_VALID); + redraw_all_later(UPD_SOME_VALID); } #endif goto failed; diff --git a/src/ex_cmds.c b/src/ex_cmds.c index b020d61d08..87a7b50e06 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -1184,7 +1184,7 @@ do_filter( vim_free(cmd_buf); goto error; } - redraw_curbuf_later(VALID); + redraw_curbuf_later(UPD_VALID); } read_linecount = curbuf->b_ml.ml_line_count; @@ -3184,7 +3184,7 @@ do_ecmd( update_topline(); curwin->w_scbind_pos = curwin->w_topline; *so_ptr = n; - redraw_curbuf_later(NOT_VALID); // redraw this buffer later + redraw_curbuf_later(UPD_NOT_VALID); // redraw this buffer later } if (p_im && (State & MODE_INSERT) == 0) @@ -4324,9 +4324,9 @@ ex_substitute(exarg_T *eap) update_topline(); validate_cursor(); - update_screen(SOME_VALID); + update_screen(UPD_SOME_VALID); highlight_match = FALSE; - redraw_later(SOME_VALID); + redraw_later(UPD_SOME_VALID); #ifdef FEAT_FOLDING curwin->w_p_fen = save_p_fen; @@ -5270,7 +5270,7 @@ prepare_tagpreview( popup_hide(wp); // When the popup moves or resizes it may reveal part of // another window. TODO: can this be done more efficiently? - redraw_all_later(NOT_VALID); + redraw_all_later(UPD_NOT_VALID); } } else diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 70c54025bd..902fc2c1a2 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -551,7 +551,7 @@ do_exmode( #endif --RedrawingDisabled; --no_wait_return; - update_screen(CLEAR); + update_screen(UPD_CLEAR); need_wait_return = FALSE; msg_scroll = save_msg_scroll; } @@ -5777,7 +5777,7 @@ ex_colorscheme(exarg_T *eap) else if (has_vtp_working()) { // background color change requires clear + redraw - update_screen(CLEAR); + update_screen(UPD_CLEAR); redrawcmd(); } #endif @@ -7116,7 +7116,7 @@ do_exedit( #ifdef FEAT_GUI hold_gui_events = 0; #endif - must_redraw = CLEAR; + must_redraw = UPD_CLEAR; pending_exmode_active = TRUE; main_loop(FALSE, TRUE); @@ -7342,7 +7342,7 @@ ex_syncbind(exarg_T *eap UNUSED) else scrolldown(-y, TRUE); curwin->w_scbind_pos = topline; - redraw_later(VALID); + redraw_later(UPD_VALID); cursor_correct(); curwin->w_redr_status = TRUE; } @@ -7438,7 +7438,7 @@ ex_read(exarg_T *eap) deleted_lines_mark(lnum, 1L); } } - redraw_curbuf_later(VALID); + redraw_curbuf_later(UPD_VALID); } } } @@ -8370,7 +8370,7 @@ ex_redraw(exarg_T *eap) p_lz = FALSE; validate_cursor(); update_topline(); - update_screen(eap->forceit ? CLEAR : VIsual_active ? INVERTED : 0); + update_screen(eap->forceit ? UPD_CLEAR : VIsual_active ? UPD_INVERTED : 0); if (need_maketitle) maketitle(); #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL)) @@ -8414,7 +8414,7 @@ ex_redrawstatus(exarg_T *eap UNUSED) status_redraw_all(); else status_redraw_curbuf(); - update_screen(VIsual_active ? INVERTED : 0); + update_screen(VIsual_active ? UPD_INVERTED : 0); RedrawingDisabled = r; p_lz = p; out_flush(); @@ -8937,7 +8937,7 @@ ex_pedit(exarg_T *eap) { // Return cursor to where we were validate_cursor(); - redraw_later(VALID); + redraw_later(UPD_VALID); win_enter(curwin_save, TRUE); } # ifdef FEAT_PROP_POPUP @@ -9685,7 +9685,7 @@ set_no_hlsearch(int flag) ex_nohlsearch(exarg_T *eap UNUSED) { set_no_hlsearch(TRUE); - redraw_all_later(SOME_VALID); + redraw_all_later(UPD_SOME_VALID); } #endif diff --git a/src/ex_getln.c b/src/ex_getln.c index 6c2a3a4b44..04273379b3 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -397,9 +397,9 @@ finish_incsearch_highlighting( magic_overruled = is_state->magic_overruled_save; validate_cursor(); // needed for TAB - redraw_all_later(SOME_VALID); + redraw_all_later(UPD_SOME_VALID); if (call_update_screen) - update_screen(SOME_VALID); + update_screen(UPD_SOME_VALID); } } @@ -473,7 +473,7 @@ may_do_incsearch_highlighting( { found = 0; set_no_hlsearch(TRUE); // turn off previous highlight - redraw_all_later(SOME_VALID); + redraw_all_later(UPD_SOME_VALID); } else { @@ -556,7 +556,7 @@ may_do_incsearch_highlighting( if (empty_pattern(ccline.cmdbuff + skiplen, search_delim) && !no_hlsearch) { - redraw_all_later(SOME_VALID); + redraw_all_later(UPD_SOME_VALID); set_no_hlsearch(TRUE); } ccline.cmdbuff[skiplen + patlen] = next_char; @@ -567,7 +567,7 @@ may_do_incsearch_highlighting( if (p_ru && curwin->w_status_height > 0) curwin->w_redr_status = TRUE; - update_screen(SOME_VALID); + update_screen(UPD_SOME_VALID); highlight_match = FALSE; restore_last_search_pattern(); @@ -692,7 +692,7 @@ may_adjust_incsearch_highlighting( validate_cursor(); highlight_match = TRUE; save_viewstate(&is_state->old_viewstate); - update_screen(NOT_VALID); + update_screen(UPD_NOT_VALID); highlight_match = FALSE; redrawcmdline(); curwin->w_cursor = is_state->match_end; @@ -1623,7 +1623,7 @@ getcmdline_int( made_cmdheight_nonzero = TRUE; lastwin->w_p_so = 0; set_option_value((char_u *)"ch", 1L, NULL, 0); - update_screen(VALID); // redraw the screen NOW + update_screen(UPD_VALID); // redraw the screen NOW made_cmdheight_nonzero = FALSE; lastwin->w_p_so = save_so; } @@ -2616,7 +2616,7 @@ theend: made_cmdheight_nonzero = TRUE; set_option_value((char_u *)"ch", 0L, NULL, 0); // Redraw is needed for command line completion - redraw_all_later(CLEAR); + redraw_all_later(UPD_CLEAR); made_cmdheight_nonzero = FALSE; } @@ -4541,7 +4541,7 @@ open_cmdwin(void) curwin->w_cursor.col = ccline.cmdpos; changed_line_abv_curs(); invalidate_botline(); - redraw_later(SOME_VALID); + redraw_later(UPD_SOME_VALID); // No Ex mode here! exmode_active = 0; diff --git a/src/fileio.c b/src/fileio.c index 4287e8f6cd..7750c525b7 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2375,7 +2375,7 @@ failed: linecnt = 0; if (newfile || read_buffer) { - redraw_curbuf_later(NOT_VALID); + redraw_curbuf_later(UPD_NOT_VALID); #ifdef FEAT_DIFF // After reading the text into the buffer the diff info needs to // be updated. diff --git a/src/fold.c b/src/fold.c index ee94a979f0..83d1cf68df 100644 --- a/src/fold.c +++ b/src/fold.c @@ -413,7 +413,7 @@ opFoldRange( emsg(_(e_no_fold_found)); // Force a redraw to remove the Visual highlighting. if (had_visual) - redraw_curbuf_later(INVERTED); + redraw_curbuf_later(UPD_INVERTED); } // openFold() {{{2 @@ -786,7 +786,7 @@ deleteFold( emsg(_(e_no_fold_found)); // Force a redraw to remove the Visual highlighting. if (had_visual) - redraw_curbuf_later(INVERTED); + redraw_curbuf_later(UPD_INVERTED); } else // Deleting markers may make cursor column invalid. @@ -875,7 +875,7 @@ foldUpdate(win_T *wp, linenr_T top, linenr_T bot) foldUpdateAll(win_T *win) { win->w_foldinvalid = TRUE; - redraw_win_later(win, NOT_VALID); + redraw_win_later(win, UPD_NOT_VALID); } // foldMoveTo() {{{2 diff --git a/src/getchar.c b/src/getchar.c index f3dbe4a849..c7601ef615 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -2098,7 +2098,7 @@ getchar_common(typval_T *argvars, typval_T *rettv) // redraw the screen after getchar() if (p_ch == 0) - update_screen(CLEAR); + update_screen(UPD_CLEAR); set_vim_var_nr(VV_MOUSE_WIN, 0); set_vim_var_nr(VV_MOUSE_WINID, 0); diff --git a/src/gui.c b/src/gui.c index 2275189ba6..e1bc73f782 100644 --- a/src/gui.c +++ b/src/gui.c @@ -4516,11 +4516,11 @@ gui_do_scroll(void) #endif ) { - int type = VALID; + int type = UPD_VALID; if (pum_visible()) { - type = NOT_VALID; + type = UPD_NOT_VALID; wp->w_lines_valid = 0; } @@ -5527,7 +5527,7 @@ drop_callback(void *cookie) } // Update the screen display - update_screen(NOT_VALID); + update_screen(UPD_NOT_VALID); # ifdef FEAT_MENU gui_update_menus(0); # endif diff --git a/src/gui_haiku.cc b/src/gui_haiku.cc index 1dd29b760a..78a444a914 100644 --- a/src/gui_haiku.cc +++ b/src/gui_haiku.cc @@ -656,7 +656,7 @@ drop_callback(void *cookie) // TODO here we could handle going to a specific position in the dropped // file (see src/gui_mac.c, deleted in 8.2.1422) // Update the screen display - update_screen(NOT_VALID); + update_screen(UPD_NOT_VALID); } // Really handle dropped files and folders. diff --git a/src/highlight.c b/src/highlight.c index dc11df4d4a..af85c385da 100644 --- a/src/highlight.c +++ b/src/highlight.c @@ -696,7 +696,7 @@ highlight_group_link( hlgroup->sg_script_ctx.sc_lnum += SOURCING_LNUM; #endif hlgroup->sg_cleared = FALSE; - redraw_all_later(SOME_VALID); + redraw_all_later(UPD_SOME_VALID); // Only call highlight_changed() once after multiple changes. need_highlight_changed = TRUE; @@ -939,7 +939,7 @@ highlight_set_ctermfg(int idx, int color, int is_normal_group) if (!gui.in_use && !gui.starting) #endif { - must_redraw = CLEAR; + must_redraw = UPD_CLEAR; if (termcap_active && color >= 0) term_fg_color(color); } @@ -962,7 +962,7 @@ highlight_set_ctermbg(int idx, int color, int is_normal_group) if (!gui.in_use && !gui.starting) #endif { - must_redraw = CLEAR; + must_redraw = UPD_CLEAR; if (color >= 0) { int dark = -1; @@ -1005,7 +1005,7 @@ highlight_set_ctermul(int idx, int color, int is_normal_group) if (!gui.in_use && !gui.starting) #endif { - must_redraw = CLEAR; + must_redraw = UPD_CLEAR; if (termcap_active && color >= 0) term_ul_color(color); } @@ -1725,7 +1725,7 @@ do_highlight( { highlight_gui_started(); did_highlight_changed = TRUE; - redraw_all_later(NOT_VALID); + redraw_all_later(UPD_NOT_VALID); } #endif #ifdef FEAT_VTP @@ -1779,7 +1779,7 @@ do_highlight( // redrawing. This may happen when evaluating 'statusline' changes the // StatusLine group. if (!updating_screen) - redraw_all_later(NOT_VALID); + redraw_all_later(UPD_NOT_VALID); need_highlight_changed = TRUE; } } @@ -1919,7 +1919,7 @@ set_normal_colors(void) FALSE, TRUE, FALSE)) { gui_mch_new_colors(); - must_redraw = CLEAR; + must_redraw = UPD_CLEAR; } # ifdef FEAT_GUI_X11 if (set_group_colors((char_u *)"Menu", @@ -1929,7 +1929,7 @@ set_normal_colors(void) # ifdef FEAT_MENU gui_mch_new_menu_colors(); # endif - must_redraw = CLEAR; + must_redraw = UPD_CLEAR; } # ifdef FEAT_BEVAL_GUI if (set_group_colors((char_u *)"Tooltip", @@ -1939,7 +1939,7 @@ set_normal_colors(void) # ifdef FEAT_TOOLBAR gui_mch_new_tooltip_colors(); # endif - must_redraw = CLEAR; + must_redraw = UPD_CLEAR; } # endif if (set_group_colors((char_u *)"Scrollbar", @@ -1947,7 +1947,7 @@ set_normal_colors(void) FALSE, FALSE, FALSE)) { gui_new_scrollbar_colors(); - must_redraw = CLEAR; + must_redraw = UPD_CLEAR; } # endif } @@ -1973,7 +1973,7 @@ set_normal_colors(void) // color cterm_normal_fg_gui_color = HL_TABLE()[idx].sg_gui_fg; cterm_normal_bg_gui_color = HL_TABLE()[idx].sg_gui_bg; - must_redraw = CLEAR; + must_redraw = UPD_CLEAR; } } } @@ -2545,7 +2545,7 @@ get_attr_entry(garray_T *table, attrentry_T *aep) clear_hl_tables(); - must_redraw = CLEAR; + must_redraw = UPD_CLEAR; for (i = 0; i < highlight_ga.ga_len; ++i) set_hl_attr(i); diff --git a/src/if_lua.c b/src/if_lua.c index 250da02ae2..4463ac0693 100644 --- a/src/if_lua.c +++ b/src/if_lua.c @@ -1543,7 +1543,7 @@ luaV_buffer_insert(lua_State *L) else appended_lines_mark(n, 1L); curbuf = buf; - update_screen(VALID); + update_screen(UPD_VALID); return 0; } @@ -1645,7 +1645,7 @@ luaV_window_newindex(lua_State *L) if (v < 1 || v > w->w_buffer->b_ml.ml_line_count) luaL_error(L, "line out of range"); w->w_cursor.lnum = v; - update_screen(VALID); + update_screen(UPD_VALID); } else if (strncmp(s, "col", 3) == 0) { @@ -1654,7 +1654,7 @@ luaV_window_newindex(lua_State *L) #endif w->w_cursor.col = v - 1; w->w_set_curswant = TRUE; - update_screen(VALID); + update_screen(UPD_VALID); } else if (strncmp(s, "width", 5) == 0) { @@ -1914,7 +1914,7 @@ luaV_command(lua_State *L) execute_cmds_from_string(s); vim_free(s); - update_screen(VALID); + update_screen(UPD_VALID); return 0; } @@ -2661,7 +2661,7 @@ ex_luado(exarg_T *eap) } lua_pop(L, 1); // function check_cursor(); - update_screen(NOT_VALID); + update_screen(UPD_NOT_VALID); } void diff --git a/src/if_mzsch.c b/src/if_mzsch.c index 2c0f39c919..0c100fe26a 100644 --- a/src/if_mzsch.c +++ b/src/if_mzsch.c @@ -1631,7 +1631,7 @@ vim_command(void *data, int argc, Scheme_Object **argv) // may be use do_cmdline_cmd? do_cmdline(BYTE_STRING_VALUE(cmd), NULL, NULL, DOCMD_NOWAIT|DOCMD_VERBOSE); - update_screen(VALID); + update_screen(UPD_VALID); MZ_GC_UNREG(); raise_if_error(); @@ -1836,7 +1836,7 @@ set_option(void *data, int argc, Scheme_Object **argv) MZ_GC_UNREG(); do_set(command, scope); vim_free(command); - update_screen(NOT_VALID); + update_screen(UPD_NOT_VALID); curbuf = save_curb; curwin = save_curw; raise_if_error(); @@ -2106,7 +2106,7 @@ set_cursor(void *data, int argc, Scheme_Object **argv) win->win->w_cursor.lnum = lnum; win->win->w_cursor.col = col; win->win->w_set_curswant = TRUE; - update_screen(VALID); + update_screen(UPD_VALID); raise_if_error(); return scheme_void; @@ -2781,7 +2781,7 @@ insert_buffer_line_list(void *data, int argc, Scheme_Object **argv) } curbuf = savebuf; - update_screen(VALID); + update_screen(UPD_VALID); MZ_GC_UNREG(); raise_if_error(); @@ -2841,7 +2841,7 @@ insert_buffer_line_list(void *data, int argc, Scheme_Object **argv) free_array(array); MZ_GC_UNREG(); curbuf = savebuf; - update_screen(VALID); + update_screen(UPD_VALID); } MZ_GC_UNREG(); diff --git a/src/if_perl.xs b/src/if_perl.xs index 1afb1d4cf1..8923926ddd 100644 --- a/src/if_perl.xs +++ b/src/if_perl.xs @@ -1460,7 +1460,7 @@ ex_perldo(exarg_T *eap) FREETMPS; LEAVE; check_cursor(); - update_screen(NOT_VALID); + update_screen(UPD_NOT_VALID); if (!length) return; @@ -1584,7 +1584,7 @@ SetOption(line) PPCODE: if (line != NULL) do_set((char_u *)line, 0); - update_screen(NOT_VALID); + update_screen(UPD_NOT_VALID); void DoCommand(line) @@ -1777,7 +1777,7 @@ Cursor(win, ...) win->w_cursor.col = col; win->w_set_curswant = TRUE; check_cursor(); /* put cursor on an existing line */ - update_screen(NOT_VALID); + update_screen(UPD_NOT_VALID); } MODULE = VIM PACKAGE = VIBUF @@ -1929,7 +1929,7 @@ Delete(vimbuf, ...) aucmd_restbuf(&aco); /* Careful: autocommands may have made "vimbuf" invalid! */ - update_curbuf(VALID); + update_curbuf(UPD_VALID); } } } @@ -1970,7 +1970,7 @@ Append(vimbuf, ...) aucmd_restbuf(&aco); /* Careful: autocommands may have made "vimbuf" invalid! */ - update_curbuf(VALID); + update_curbuf(UPD_VALID); } } } diff --git a/src/if_py_both.h b/src/if_py_both.h index 240cc966ae..b7276c53db 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -697,7 +697,7 @@ VimCommand(PyObject *self UNUSED, PyObject *string) VimTryStart(); do_cmdline_cmd(cmd); - update_screen(VALID); + update_screen(UPD_VALID); Python_Release_Vim(); Py_END_ALLOW_THREADS @@ -4067,7 +4067,7 @@ WindowSetattr(WindowObject *self, char *name, PyObject *valObject) // When column is out of range silently correct it. check_cursor_col_win(self->win); - update_screen(VALID); + update_screen(UPD_VALID); return 0; } else if (strcmp(name, "height") == 0) @@ -4745,7 +4745,7 @@ InsertBufferLines(buf_T *buf, PyInt n, PyObject *lines, PyInt *len_change) vim_free(str); restore_win_for_buf(&switchwin, &save_curbuf); - update_screen(VALID); + update_screen(UPD_VALID); if (VimTryEnd()) return FAIL; @@ -4816,7 +4816,7 @@ InsertBufferLines(buf_T *buf, PyInt n, PyObject *lines, PyInt *len_change) PyMem_Free(array); restore_win_for_buf(&switchwin, &save_curbuf); - update_screen(VALID); + update_screen(UPD_VALID); if (VimTryEnd()) return FAIL; @@ -5825,7 +5825,7 @@ out: if (status) return; check_cursor(); - update_curbuf(NOT_VALID); + update_curbuf(UPD_NOT_VALID); } static void diff --git a/src/if_ruby.c b/src/if_ruby.c index 68c1e591ac..3a92fa8cf9 100644 --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -988,7 +988,7 @@ ex_rubydo(exarg_T *eap) } } check_cursor(); - update_curbuf(NOT_VALID); + update_curbuf(UPD_NOT_VALID); } } @@ -1195,7 +1195,7 @@ vim_message(VALUE self UNUSED, VALUE str) vim_set_option(VALUE self UNUSED, VALUE str) { do_set((char_u *)StringValuePtr(str), 0); - update_screen(NOT_VALID); + update_screen(UPD_NOT_VALID); return Qnil; } @@ -1492,7 +1492,7 @@ set_buffer_line(buf_T *buf, linenr_T n, VALUE str) aucmd_restbuf(&aco); // Careful: autocommands may have made "buf" invalid! - update_curbuf(NOT_VALID); + update_curbuf(UPD_NOT_VALID); } else { @@ -1538,7 +1538,7 @@ buffer_delete(VALUE self, VALUE num) aucmd_restbuf(&aco); // Careful: autocommands may have made "buf" invalid! - update_curbuf(NOT_VALID); + update_curbuf(UPD_NOT_VALID); } else { @@ -1579,7 +1579,7 @@ buffer_append(VALUE self, VALUE num, VALUE str) aucmd_restbuf(&aco); // Careful: autocommands may have made "buf" invalid! - update_curbuf(NOT_VALID); + update_curbuf(UPD_NOT_VALID); } else { @@ -1774,7 +1774,7 @@ window_set_cursor(VALUE self, VALUE pos) win->w_cursor.col = NUM2UINT(col); win->w_set_curswant = TRUE; check_cursor(); // put cursor on an existing line - update_screen(NOT_VALID); + update_screen(UPD_NOT_VALID); return Qnil; } diff --git a/src/if_tcl.c b/src/if_tcl.c index f2b5541d73..6c7768972a 100644 --- a/src/if_tcl.c +++ b/src/if_tcl.c @@ -931,13 +931,13 @@ bufselfcmd( } if (flags & FL_UPDATE_CURBUF) - redraw_curbuf_later(NOT_VALID); + redraw_curbuf_later(UPD_NOT_VALID); curbuf = savebuf; curwin = savewin; if (flags & FL_ADJUST_CURSOR) check_cursor(); if (flags & (FL_UPDATE_SCREEN | FL_UPDATE_CURBUF)) - update_screen(NOT_VALID); + update_screen(UPD_NOT_VALID); return err; } @@ -1115,7 +1115,7 @@ winselfcmd( curwin = savewin; curbuf = savebuf; if (flags & FL_UPDATE_SCREEN) - update_screen(NOT_VALID); + update_screen(UPD_NOT_VALID); return err; } @@ -1131,7 +1131,7 @@ commandcmd( int err; err = tcldoexcommand(interp, objc, objv, 1); - update_screen(VALID); + update_screen(UPD_VALID); return err; } @@ -1145,7 +1145,7 @@ optioncmd( int err; err = tclsetoption(interp, objc, objv, 1); - update_screen(VALID); + update_screen(UPD_VALID); return err; } diff --git a/src/indent.c b/src/indent.c index 90ad5e2e7b..d941abc0bc 100644 --- a/src/indent.c +++ b/src/indent.c @@ -1132,7 +1132,7 @@ op_reindent(oparg_T *oap, int (*how)(void)) oap->is_VIsual ? start_lnum + oap->line_count : last_changed + 1, 0L); else if (oap->is_VIsual) - redraw_curbuf_later(INVERTED); + redraw_curbuf_later(UPD_INVERTED); if (oap->line_count > p_report) { @@ -1830,10 +1830,10 @@ ex_retab(exarg_T *eap) && tabstop_eq(curbuf->b_p_vts_array, new_vts_array)) ; // not changed else - redraw_curbuf_later(NOT_VALID); + redraw_curbuf_later(UPD_NOT_VALID); #else if (curbuf->b_p_ts != new_ts) - redraw_curbuf_later(NOT_VALID); + redraw_curbuf_later(UPD_NOT_VALID); #endif if (first_line != 0) changed_lines(first_line, 0, last_line + 1, 0L); diff --git a/src/main.c b/src/main.c index 2ffee14226..c6430aaac5 100644 --- a/src/main.c +++ b/src/main.c @@ -686,7 +686,7 @@ vim_main2(void) && !gui.in_use #endif ) - must_redraw = CLEAR; + must_redraw = UPD_CLEAR; else { screenclear(); // clear screen @@ -788,7 +788,7 @@ vim_main2(void) #endif RedrawingDisabled = 0; - redraw_all_later(NOT_VALID); + redraw_all_later(UPD_NOT_VALID); no_wait_return = FALSE; // 'autochdir' has been postponed @@ -1412,7 +1412,7 @@ main_loop( validate_cursor(); if (VIsual_active) - update_curbuf(INVERTED); // update inverted part + update_curbuf(UPD_INVERTED); // update inverted part else if (must_redraw) { mch_disable_flush(); // Stop issuing gui_mch_flush(). diff --git a/src/match.c b/src/match.c index e58ad013cb..335b06011f 100644 --- a/src/match.c +++ b/src/match.c @@ -39,7 +39,7 @@ match_add( matchitem_T *m; int hlg_id; regprog_T *regprog = NULL; - int rtype = SOME_VALID; + int rtype = UPD_SOME_VALID; if (*grp == NUL || (pat != NULL && *pat == NUL)) return -1; @@ -192,7 +192,7 @@ match_add( } m->pos.toplnum = toplnum; m->pos.botlnum = botlnum; - rtype = VALID; + rtype = UPD_VALID; } } @@ -228,7 +228,7 @@ match_delete(win_T *wp, int id, int perr) { matchitem_T *cur = wp->w_match_head; matchitem_T *prev = cur; - int rtype = SOME_VALID; + int rtype = UPD_SOME_VALID; if (id < 1) { @@ -269,7 +269,7 @@ match_delete(win_T *wp, int id, int perr) wp->w_buffer->b_mod_bot = cur->pos.botlnum; wp->w_buffer->b_mod_xlines = 0; } - rtype = VALID; + rtype = UPD_VALID; } vim_free(cur); redraw_win_later(wp, rtype); @@ -292,7 +292,7 @@ clear_matches(win_T *wp) vim_free(wp->w_match_head); wp->w_match_head = m; } - redraw_win_later(wp, SOME_VALID); + redraw_win_later(wp, UPD_SOME_VALID); } /* diff --git a/src/memline.c b/src/memline.c index 8c31b9de2f..a495636778 100644 --- a/src/memline.c +++ b/src/memline.c @@ -1763,7 +1763,7 @@ ml_recover(int checkext) set_option_value_give_err((char_u *)"key", 0L, buf->b_p_key, OPT_LOCAL); } #endif - redraw_curbuf_later(NOT_VALID); + redraw_curbuf_later(UPD_NOT_VALID); theend: vim_free(fname_used); @@ -3074,8 +3074,6 @@ ml_append_int( */ if (lines_moved) { - /* - */ dp_right->db_txt_start -= data_moved; dp_right->db_free -= total_moved; mch_memmove((char *)dp_right + dp_right->db_txt_start, @@ -3433,7 +3431,7 @@ ml_append_buf( * Do not use it after calling ml_replace(). * * Check: The caller of this function should probably also call - * changed_lines(), unless update_screen(NOT_VALID) is used. + * changed_lines(), unless update_screen(UPD_NOT_VALID) is used. * * return FAIL for failure, OK otherwise */ @@ -5145,7 +5143,7 @@ findswapname( // pretend screen didn't scroll, need redraw anyway msg_scrolled = 0; - redraw_all_later(NOT_VALID); + redraw_all_later(UPD_NOT_VALID); } #endif diff --git a/src/menu.c b/src/menu.c index bfad016adb..014d0518de 100644 --- a/src/menu.c +++ b/src/menu.c @@ -299,7 +299,7 @@ ex_menu( root_menu_ptr = get_root_menu(menu_path); if (root_menu_ptr == &curwin->w_winbar) // Assume the window toolbar menu will change. - redraw_later(NOT_VALID); + redraw_later(UPD_NOT_VALID); if (enable != MAYBE) { diff --git a/src/message.c b/src/message.c index ec43387f6c..715c7beb5a 100644 --- a/src/message.c +++ b/src/message.c @@ -1138,7 +1138,7 @@ wait_return(int redraw) FILE *save_scriptout; if (redraw == TRUE) - must_redraw = CLEAR; + must_redraw = UPD_CLEAR; // If using ":silent cmd", don't wait for a return. Also don't set // need_wait_return to do it later. @@ -1362,7 +1362,7 @@ wait_return(int redraw) && (redraw == TRUE || (msg_scrolled != 0 && redraw != -1))) { starttermcap(); // start termcap before redrawing - redraw_later(VALID); + redraw_later(UPD_VALID); } } @@ -2485,8 +2485,8 @@ inc_msg_scrolled(void) } #endif ++msg_scrolled; - if (must_redraw < VALID) - must_redraw = VALID; + if (must_redraw < UPD_VALID) + must_redraw = UPD_VALID; } /* diff --git a/src/misc1.c b/src/misc1.c index f4a313d416..6b01ef2bba 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -585,8 +585,8 @@ check_status(buf_T *buf) if (wp->w_buffer == buf && wp->w_status_height) { wp->w_redr_status = TRUE; - if (must_redraw < VALID) - must_redraw = VALID; + if (must_redraw < UPD_VALID) + must_redraw = UPD_VALID; } } @@ -1149,7 +1149,7 @@ vim_beep(unsigned val) # endif ) { - redraw_later(CLEAR); + redraw_later(UPD_CLEAR); update_screen(0); redrawcmd(); } diff --git a/src/misc2.c b/src/misc2.c index c5149ff21b..e17a6f1ead 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -719,7 +719,7 @@ leftcol_changed(void) if (retval) curwin->w_set_curswant = TRUE; - redraw_later(NOT_VALID); + redraw_later(UPD_NOT_VALID); return retval; } diff --git a/src/mouse.c b/src/mouse.c index c126a9ed0b..c39f6148b4 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -624,7 +624,7 @@ do_mouse( if (jump_flags) { jump_flags = jump_to_mouse(jump_flags, NULL, which_button); - update_curbuf(VIsual_active ? INVERTED : VALID); + update_curbuf(VIsual_active ? UPD_INVERTED : UPD_VALID); setcursor(); out_flush(); // Update before showing popup menu } @@ -1027,7 +1027,7 @@ do_mouse( curwin->w_set_curswant = TRUE; } if (is_click) - redraw_curbuf_later(INVERTED); // update the inversion + redraw_curbuf_later(UPD_INVERTED); // update the inversion } else if (VIsual_active && !old_active) { @@ -1164,7 +1164,7 @@ ins_mousescroll(int dir) // overlapped by the popup menu. if (pum_visible() && did_scroll) { - redraw_all_later(NOT_VALID); + redraw_all_later(UPD_NOT_VALID); ins_compl_show_pum(); } @@ -1597,7 +1597,7 @@ retnomove: if (flags & MOUSE_MAY_STOP_VIS) { end_visual_mode_keep_button(); - redraw_curbuf_later(INVERTED); // delete the inversion + redraw_curbuf_later(UPD_INVERTED); // delete the inversion } #if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD) // Continue a modeless selection in another window. @@ -1738,7 +1738,7 @@ retnomove: && (flags & MOUSE_MAY_STOP_VIS)))) { end_visual_mode_keep_button(); - redraw_curbuf_later(INVERTED); // delete the inversion + redraw_curbuf_later(UPD_INVERTED); // delete the inversion } #ifdef FEAT_CMDWIN if (cmdwin_type != 0 && wp != curwin) @@ -1842,7 +1842,7 @@ retnomove: if (flags & MOUSE_MAY_STOP_VIS) { end_visual_mode_keep_button(); - redraw_curbuf_later(INVERTED); // delete the inversion + redraw_curbuf_later(UPD_INVERTED); // delete the inversion } #if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD) @@ -1904,7 +1904,7 @@ retnomove: #endif curwin->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP); - redraw_later(VALID); + redraw_later(UPD_VALID); row = 0; } else if (row >= curwin->w_height) @@ -1942,7 +1942,7 @@ retnomove: #ifdef FEAT_DIFF check_topfill(curwin, FALSE); #endif - redraw_later(VALID); + redraw_later(UPD_VALID); curwin->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_BOTLINE_AP); row = curwin->w_height - 1; @@ -1968,7 +1968,7 @@ retnomove: // Only use ScreenCols[] after the window was redrawn. Mainly matters // for tests, a user would not click before redrawing. // Do not use when 'virtualedit' is active. - if (curwin->w_redr_type <= VALID_NO_UPDATE && !virtual_active()) + if (curwin->w_redr_type <= UPD_VALID_NO_UPDATE && !virtual_active()) col_from_screen = ScreenCols[off]; #ifdef FEAT_FOLDING // Remember the character under the mouse, it might be a '-' or '+' in diff --git a/src/move.c b/src/move.c index 5bf2592269..089ffca399 100644 --- a/src/move.c +++ b/src/move.c @@ -131,7 +131,7 @@ redraw_for_cursorline(win_T *wp) && !pum_visible()) { // win_line() will redraw the number column and cursorline only. - redraw_win_later(wp, VALID); + redraw_win_later(wp, UPD_VALID); } } @@ -145,12 +145,13 @@ redraw_for_cursorcolumn(win_T *wp) { if ((wp->w_valid & VALID_VIRTCOL) == 0 && !pum_visible()) { - // When 'cursorcolumn' is set need to redraw with SOME_VALID. + // When 'cursorcolumn' is set need to redraw with UPD_SOME_VALID. if (wp->w_p_cuc) - redraw_win_later(wp, SOME_VALID); - // When 'cursorlineopt' contains "screenline" need to redraw with VALID. + redraw_win_later(wp, UPD_SOME_VALID); + // When 'cursorlineopt' contains "screenline" need to redraw with + // UPD_VALID. else if (wp->w_p_cul && (wp->w_p_culopt_flags & CULOPT_SCRLINE)) - redraw_win_later(wp, VALID); + redraw_win_later(wp, UPD_VALID); } } #endif @@ -218,7 +219,7 @@ update_topline(void) if (BUFEMPTY()) // special case - file is empty { if (curwin->w_topline != 1) - redraw_later(NOT_VALID); + redraw_later(UPD_NOT_VALID); curwin->w_topline = 1; curwin->w_botline = 2; curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP; @@ -401,10 +402,10 @@ update_topline(void) if (curwin->w_skipcol != 0) { curwin->w_skipcol = 0; - redraw_later(NOT_VALID); + redraw_later(UPD_NOT_VALID); } else - redraw_later(VALID); + redraw_later(UPD_VALID); // May need to set w_skipcol when cursor in w_topline. if (curwin->w_cursor.lnum == curwin->w_topline) validate_cursor(); @@ -522,7 +523,7 @@ changed_window_setting_win(win_T *wp) wp->w_lines_valid = 0; changed_line_abv_curs_win(wp); wp->w_valid &= ~(VALID_BOTLINE|VALID_BOTLINE_AP|VALID_TOPLINE); - redraw_win_later(wp, NOT_VALID); + redraw_win_later(wp, UPD_NOT_VALID); } /* @@ -552,7 +553,7 @@ set_topline(win_T *wp, linenr_T lnum) #endif wp->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE|VALID_TOPLINE); // Don't set VALID_TOPLINE here, 'scrolloff' needs to be checked. - redraw_later(VALID); + redraw_later(UPD_VALID); } /* @@ -1089,7 +1090,7 @@ curs_columns( { curwin->w_leftcol = new_leftcol; // screen has to be redrawn with new curwin->w_leftcol - redraw_later(NOT_VALID); + redraw_later(UPD_NOT_VALID); } } curwin->w_wcol -= curwin->w_leftcol; @@ -1202,7 +1203,7 @@ curs_columns( else curwin->w_skipcol = 0; if (prev_skipcol != curwin->w_skipcol) - redraw_later(NOT_VALID); + redraw_later(UPD_NOT_VALID); #ifdef FEAT_SYN_HL redraw_for_cursorcolumn(curwin); @@ -2672,7 +2673,7 @@ onepage(int dir, long count) #endif } - redraw_later(VALID); + redraw_later(UPD_VALID); return retval; } @@ -2924,7 +2925,7 @@ halfpage(int flag, linenr_T Prenum) #endif cursor_correct(); beginline(BL_SOL | BL_FIX); - redraw_later(VALID); + redraw_later(UPD_VALID); } void @@ -2978,7 +2979,7 @@ do_check_cursorbind(void) // Correct cursor for multi-byte character. if (has_mbyte) mb_adjust_cursor(); - redraw_later(VALID); + redraw_later(UPD_VALID); // Only scroll when 'scrollbind' hasn't done this. if (!curwin->w_p_scb) diff --git a/src/netbeans.c b/src/netbeans.c index 5c4527948e..f9ef19a140 100644 --- a/src/netbeans.c +++ b/src/netbeans.c @@ -116,7 +116,7 @@ netbeans_close(void) // remove all signs and update the screen after gutter removal coloncmd(":sign unplace *"); changed_window_setting(); - update_screen(CLEAR); + update_screen(UPD_CLEAR); setcursor(); cursor_on(); out_flush_cursor(TRUE, FALSE); @@ -1835,9 +1835,9 @@ nb_do_cmd( } // gui_update_cursor(TRUE, FALSE); - // update_curbuf(NOT_VALID); + // update_curbuf(UPD_NOT_VALID); update_topline(); // scroll to show the line - update_screen(VALID); + update_screen(UPD_VALID); setcursor(); cursor_on(); out_flush_cursor(TRUE, FALSE); @@ -2027,7 +2027,7 @@ nb_do_cmd( args = (char_u *)cp; coloncmd(":sign unplace %d buffer=%d", serNum, buf->bufp->b_fnum); - redraw_buf_later(buf->bufp, NOT_VALID); + redraw_buf_later(buf->bufp, UPD_NOT_VALID); #endif // ===================================================================== } @@ -2113,7 +2113,7 @@ nb_do_cmd( } } #endif - redraw_buf_later(buf->bufp, NOT_VALID); + redraw_buf_later(buf->bufp, UPD_NOT_VALID); } } // ===================================================================== @@ -2223,7 +2223,7 @@ nb_do_cmd( */ if (buf != NULL && buf->initDone && do_update) { - update_screen(NOT_VALID); + update_screen(UPD_NOT_VALID); setcursor(); cursor_on(); out_flush_cursor(TRUE, FALSE); @@ -2528,7 +2528,7 @@ netbeans_open(char *params, int doabort) // update the screen after having added the gutter changed_window_setting(); - update_screen(CLEAR); + update_screen(UPD_CLEAR); setcursor(); cursor_on(); out_flush_cursor(TRUE, FALSE); diff --git a/src/normal.c b/src/normal.c index 63423d070b..ee3ad986ff 100644 --- a/src/normal.c +++ b/src/normal.c @@ -830,7 +830,7 @@ normal_cmd( && !(mod_mask & MOD_MASK_SHIFT)) { end_visual_mode(); - redraw_curbuf_later(INVERTED); + redraw_curbuf_later(UPD_INVERTED); } // Keys that work different when 'keymodel' contains "startsel" @@ -1172,7 +1172,7 @@ reset_VIsual_and_resel(void) if (VIsual_active) { end_visual_mode(); - redraw_curbuf_later(INVERTED); // delete the inversion later + redraw_curbuf_later(UPD_INVERTED); // delete the inversion later } VIsual_reselect = FALSE; } @@ -1186,7 +1186,7 @@ reset_VIsual(void) if (VIsual_active) { end_visual_mode(); - redraw_curbuf_later(INVERTED); // delete the inversion later + redraw_curbuf_later(UPD_INVERTED); // delete the inversion later VIsual_reselect = FALSE; } } @@ -1945,7 +1945,7 @@ check_scrollbind(linenr_T topline_diff, long leftcol_diff) scrolldown(-y, FALSE); } - redraw_later(VALID); + redraw_later(UPD_VALID); cursor_correct(); curwin->w_redr_status = TRUE; } @@ -2515,7 +2515,7 @@ scroll_redraw(int up, long count) } if (curwin->w_cursor.lnum != prev_lnum) coladvance(curwin->w_curswant); - redraw_later(VALID); + redraw_later(UPD_VALID); } /* @@ -2709,7 +2709,7 @@ nv_zet(cmdarg_T *cap) // FALLTHROUGH case 't': scroll_cursor_top(0, TRUE); - redraw_later(VALID); + redraw_later(UPD_VALID); set_fraction(curwin); break; @@ -2718,7 +2718,7 @@ nv_zet(cmdarg_T *cap) // FALLTHROUGH case 'z': scroll_cursor_halfway(TRUE); - redraw_later(VALID); + redraw_later(UPD_VALID); set_fraction(curwin); break; @@ -2741,7 +2741,7 @@ nv_zet(cmdarg_T *cap) // FALLTHROUGH case 'b': scroll_cursor_bot(0, TRUE); - redraw_later(VALID); + redraw_later(UPD_VALID); set_fraction(curwin); break; @@ -2794,7 +2794,7 @@ nv_zet(cmdarg_T *cap) if (curwin->w_leftcol != col) { curwin->w_leftcol = col; - redraw_later(NOT_VALID); + redraw_later(UPD_NOT_VALID); } } break; @@ -2816,7 +2816,7 @@ nv_zet(cmdarg_T *cap) if (curwin->w_leftcol != col) { curwin->w_leftcol = col; - redraw_later(NOT_VALID); + redraw_later(UPD_NOT_VALID); } } break; @@ -3277,7 +3277,7 @@ nv_clear(cmdarg_T *cap) } # endif #endif - redraw_later(CLEAR); + redraw_later(UPD_CLEAR); #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL)) # ifdef VIMDLL if (!gui.in_use) @@ -4193,7 +4193,7 @@ nv_next(cmdarg_T *cap) #ifdef FEAT_SEARCH_EXTRA // Redraw the window to refresh the highlighted matches. if (i > 0 && p_hls && !no_hlsearch) - redraw_later(SOME_VALID); + redraw_later(UPD_SOME_VALID); #endif } @@ -4241,7 +4241,7 @@ normal_search( #ifdef FEAT_SEARCH_EXTRA // Redraw the window to refresh the highlighted matches. if (!EQUAL_POS(curwin->w_cursor, prev_cursor) && p_hls && !no_hlsearch) - redraw_later(SOME_VALID); + redraw_later(UPD_SOME_VALID); #endif // "/$" will put the cursor after the end of the line, may need to @@ -5462,7 +5462,7 @@ nv_visual(cmdarg_T *cap) showmode(); may_trigger_modechanged(); } - redraw_curbuf_later(INVERTED); // update the inversion + redraw_curbuf_later(UPD_INVERTED); // update the inversion } else // start Visual mode { @@ -5515,7 +5515,7 @@ nv_visual(cmdarg_T *cap) } else curwin->w_set_curswant = TRUE; - redraw_curbuf_later(INVERTED); // show the inversion + redraw_curbuf_later(UPD_INVERTED); // show the inversion } else { @@ -5605,7 +5605,7 @@ n_start_visual_mode(int c) // Only need to redraw this line, unless still need to redraw an old // Visual area (when 'lazyredraw' is set). - if (curwin->w_redr_type < INVERTED) + if (curwin->w_redr_type < UPD_INVERTED) { curwin->w_old_cursor_lnum = curwin->w_cursor.lnum; curwin->w_old_visual_lnum = curwin->w_cursor.lnum; @@ -5716,7 +5716,7 @@ nv_gv_cmd(cmdarg_T *cap) // end are still the same, and the selection needs to be owned clip_star.vmode = NUL; #endif - redraw_curbuf_later(INVERTED); + redraw_curbuf_later(UPD_INVERTED); showmode(); } @@ -6753,7 +6753,7 @@ nv_normal(cmdarg_T *cap) if (VIsual_active) { end_visual_mode(); // stop Visual - redraw_curbuf_later(INVERTED); + redraw_curbuf_later(UPD_INVERTED); } // CTRL-\ CTRL-G restarts Insert mode when 'insertmode' is set. if (cap->nchar == Ctrl_G && p_im) @@ -6825,7 +6825,7 @@ nv_esc(cmdarg_T *cap) end_visual_mode(); // stop Visual check_cursor_col(); // make sure cursor is not beyond EOL curwin->w_set_curswant = TRUE; - redraw_curbuf_later(INVERTED); + redraw_curbuf_later(UPD_INVERTED); } else if (no_reason) vim_beep(BO_ESC); diff --git a/src/ops.c b/src/ops.c index 5ee263861e..0f7837eba1 100644 --- a/src/ops.c +++ b/src/ops.c @@ -1358,7 +1358,7 @@ op_tilde(oparg_T *oap) if (!did_change && oap->is_VIsual) // No change: need to remove the Visual selection - redraw_curbuf_later(INVERTED); + redraw_curbuf_later(UPD_INVERTED); if ((cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0) { @@ -1493,7 +1493,7 @@ op_insert(oparg_T *oap, long count1) // vis block is still marked. Get rid of it now. curwin->w_cursor.lnum = oap->start.lnum; - update_screen(INVERTED); + update_screen(UPD_INVERTED); if (oap->block_mode) { @@ -2485,7 +2485,7 @@ op_addsub( if (!change_cnt && oap->is_VIsual) // No change: need to remove the Visual selection - redraw_curbuf_later(INVERTED); + redraw_curbuf_later(UPD_INVERTED); // Set '[ mark if something changed. Keep the last end // position from do_addsub(). @@ -3908,7 +3908,7 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank) // make sure redrawing is correct curwin->w_p_lbr = lbr_saved; #endif - redraw_curbuf_later(INVERTED); + redraw_curbuf_later(UPD_INVERTED); } } } @@ -3948,7 +3948,7 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank) #ifdef FEAT_LINEBREAK curwin->w_p_lbr = lbr_saved; #endif - redraw_curbuf_later(INVERTED); + redraw_curbuf_later(UPD_INVERTED); } // If the end of an operator is in column one while oap->motion_type diff --git a/src/option.c b/src/option.c index e549ceda32..26b09caf6f 100644 --- a/src/option.c +++ b/src/option.c @@ -1278,7 +1278,7 @@ do_set( set_options_default(OPT_FREE | opt_flags); didset_options(); didset_options2(); - redraw_all_later(CLEAR); + redraw_all_later(UPD_CLEAR); } else { @@ -2147,7 +2147,7 @@ do_set( } if (full_screen) ttest(FALSE); - redraw_all_later(CLEAR); + redraw_all_later(UPD_CLEAR); } } @@ -2923,7 +2923,7 @@ set_bool_option( // when 'ignorecase' is set or reset and 'hlsearch' is set, redraw else if ((int *)varp == &p_ic && p_hls) { - redraw_all_later(SOME_VALID); + redraw_all_later(UPD_SOME_VALID); } #ifdef FEAT_SEARCH_EXTRA @@ -3206,7 +3206,7 @@ set_bool_option( // 'relativenumber' option is toggled, then don't refresh the screen // (optimization). if (!(curwin->w_p_nu && ((int *)varp == &curwin->w_p_rnu))) - redraw_all_later(CLEAR); + redraw_all_later(UPD_CLEAR); } #endif @@ -3849,13 +3849,13 @@ check_redraw(long_u flags) if ((flags & P_RBUF) || (flags & P_RWIN) || all) changed_window_setting(); if (flags & P_RBUF) - redraw_curbuf_later(NOT_VALID); + redraw_curbuf_later(UPD_NOT_VALID); if (flags & P_RWINONLY) - redraw_later(NOT_VALID); + redraw_later(UPD_NOT_VALID); if (doclear) - redraw_all_later(CLEAR); + redraw_all_later(UPD_CLEAR); else if (all) - redraw_all_later(NOT_VALID); + redraw_all_later(UPD_NOT_VALID); } /* @@ -4348,7 +4348,7 @@ set_option_value( add_termcode(key_name, string, FALSE); if (full_screen) ttest(FALSE); - redraw_all_later(CLEAR); + redraw_all_later(UPD_CLEAR); return NULL; } @@ -5213,12 +5213,12 @@ unset_global_local_option(char_u *name, void *from) case PV_LCS: clear_string_option(&((win_T *)from)->w_p_lcs); set_chars_option((win_T *)from, &((win_T *)from)->w_p_lcs, TRUE); - redraw_later(NOT_VALID); + redraw_later(UPD_NOT_VALID); break; case PV_FCS: clear_string_option(&((win_T *)from)->w_p_fcs); set_chars_option((win_T *)from, &((win_T *)from)->w_p_fcs, TRUE); - redraw_later(NOT_VALID); + redraw_later(UPD_NOT_VALID); break; case PV_VE: clear_string_option(&((win_T *)from)->w_p_ve); diff --git a/src/optionstr.c b/src/optionstr.c index 7f5a9408c7..faf62357a9 100644 --- a/src/optionstr.c +++ b/src/optionstr.c @@ -758,7 +758,7 @@ did_set_string_option( errmsg = e_invalid_argument; // list setting requires a redraw if (curwin->w_briopt_list) - redraw_all_later(NOT_VALID); + redraw_all_later(UPD_NOT_VALID); } #endif @@ -1121,7 +1121,7 @@ did_set_string_option( // Redraw needed when switching to/from "mac": a CR in the text // will be displayed differently. if (get_fileformat(curbuf) == EOL_MAC || *oldval == 'm') - redraw_curbuf_later(NOT_VALID); + redraw_curbuf_later(UPD_NOT_VALID); } } @@ -1316,7 +1316,7 @@ did_set_string_option( (void)set_chars_option(wp, local_ptr, TRUE); } - redraw_all_later(NOT_VALID); + redraw_all_later(UPD_NOT_VALID); } } // local 'listchars' @@ -1441,7 +1441,7 @@ did_set_string_option( if (varp == &T_ME) { out_str(T_ME); - redraw_later(CLEAR); + redraw_later(UPD_CLEAR); #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL)) // Since t_me has been set, this probably means that the user // wants to use this as default colors. Need to reset default @@ -1773,7 +1773,7 @@ did_set_string_option( if (curwin->w_status_height) { curwin->w_redr_status = TRUE; - redraw_later(VALID); + redraw_later(UPD_VALID); } curbuf->b_help = (curbuf->b_p_bt[0] == 'h'); redraw_titles(); @@ -2581,7 +2581,7 @@ did_set_string_option( // redraw if ((varp == &p_flp || varp == &(curbuf->b_p_flp)) && curwin->w_briopt_list) - redraw_all_later(NOT_VALID); + redraw_all_later(UPD_NOT_VALID); #endif if (curwin->w_curswant != MAXCOL diff --git a/src/os_unix.c b/src/os_unix.c index 07762f4c11..2f00614955 100644 --- a/sr