Mercurial > vim
diff src/ex_cmds.c @ 32479:87f59a64efab v9.0.1571
patch 9.0.1571: RedrawingDisabled not used consistently
Commit: https://github.com/vim/vim/commit/79cdf026f1b8a16298ee73be497c4bd5f3458cde
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 20 14:07:00 2023 +0100
patch 9.0.1571: RedrawingDisabled not used consistently
Problem: RedrawingDisabled not used consistently.
Solution: Avoid RedrawingDisabled going negative. Set RedrawingDisabled in
win_split_ins(). (closes #11961)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 20 May 2023 15:15:05 +0200 |
parents | edef053f7090 |
children | 448aef880252 |
line wrap: on
line diff
--- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3219,7 +3219,8 @@ do_ecmd( (void)keymap_init(); #endif - --RedrawingDisabled; + if (RedrawingDisabled > 0) + --RedrawingDisabled; did_inc_redrawing_disabled = FALSE; if (!skip_redraw) { @@ -3263,7 +3264,7 @@ do_ecmd( #endif theend: - if (did_inc_redrawing_disabled) + if (did_inc_redrawing_disabled && RedrawingDisabled > 0) --RedrawingDisabled; #if defined(FEAT_EVAL) if (did_set_swapcommand) @@ -3735,7 +3736,6 @@ ex_substitute(exarg_T *eap) int sublen; int got_quit = FALSE; int got_match = FALSE; - int temp; int which_pat; char_u *cmd; int save_State; @@ -4316,7 +4316,7 @@ ex_substitute(exarg_T *eap) #endif // Invert the matched string. // Remove the inversion afterwards. - temp = RedrawingDisabled; + int save_RedrawingDisabled = RedrawingDisabled; RedrawingDisabled = 0; // avoid calling update_screen() in vgetorpeek() @@ -4386,7 +4386,7 @@ ex_substitute(exarg_T *eap) msg_scroll = i; showruler(TRUE); windgoto(msg_row, msg_col); - RedrawingDisabled = temp; + RedrawingDisabled = save_RedrawingDisabled; #ifdef USE_ON_FLY_SCROLL dont_scroll = FALSE; // allow scrolling here