comparison 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
comparison
equal deleted inserted replaced
32478:8117806f2947 32479:87f59a64efab
3217 #ifdef FEAT_KEYMAP 3217 #ifdef FEAT_KEYMAP
3218 if (curbuf->b_kmap_state & KEYMAP_INIT) 3218 if (curbuf->b_kmap_state & KEYMAP_INIT)
3219 (void)keymap_init(); 3219 (void)keymap_init();
3220 #endif 3220 #endif
3221 3221
3222 --RedrawingDisabled; 3222 if (RedrawingDisabled > 0)
3223 --RedrawingDisabled;
3223 did_inc_redrawing_disabled = FALSE; 3224 did_inc_redrawing_disabled = FALSE;
3224 if (!skip_redraw) 3225 if (!skip_redraw)
3225 { 3226 {
3226 n = *so_ptr; 3227 n = *so_ptr;
3227 if (topline == 0 && command == NULL) 3228 if (topline == 0 && command == NULL)
3261 # endif 3262 # endif
3262 } 3263 }
3263 #endif 3264 #endif
3264 3265
3265 theend: 3266 theend:
3266 if (did_inc_redrawing_disabled) 3267 if (did_inc_redrawing_disabled && RedrawingDisabled > 0)
3267 --RedrawingDisabled; 3268 --RedrawingDisabled;
3268 #if defined(FEAT_EVAL) 3269 #if defined(FEAT_EVAL)
3269 if (did_set_swapcommand) 3270 if (did_set_swapcommand)
3270 set_vim_var_string(VV_SWAPCOMMAND, NULL, -1); 3271 set_vim_var_string(VV_SWAPCOMMAND, NULL, -1);
3271 #endif 3272 #endif
3733 char_u *sub_copy = NULL; 3734 char_u *sub_copy = NULL;
3734 int delimiter; 3735 int delimiter;
3735 int sublen; 3736 int sublen;
3736 int got_quit = FALSE; 3737 int got_quit = FALSE;
3737 int got_match = FALSE; 3738 int got_match = FALSE;
3738 int temp;
3739 int which_pat; 3739 int which_pat;
3740 char_u *cmd; 3740 char_u *cmd;
3741 int save_State; 3741 int save_State;
3742 linenr_T first_line = 0; // first changed line 3742 linenr_T first_line = 0; // first changed line
3743 linenr_T last_line= 0; // below last changed line AFTER the 3743 linenr_T last_line= 0; // below last changed line AFTER the
4314 4314
4315 curwin->w_p_fen = FALSE; 4315 curwin->w_p_fen = FALSE;
4316 #endif 4316 #endif
4317 // Invert the matched string. 4317 // Invert the matched string.
4318 // Remove the inversion afterwards. 4318 // Remove the inversion afterwards.
4319 temp = RedrawingDisabled; 4319 int save_RedrawingDisabled = RedrawingDisabled;
4320 RedrawingDisabled = 0; 4320 RedrawingDisabled = 0;
4321 4321
4322 // avoid calling update_screen() in vgetorpeek() 4322 // avoid calling update_screen() in vgetorpeek()
4323 p_lz = FALSE; 4323 p_lz = FALSE;
4324 4324
4384 _("replace with %s (y/n/a/q/l/^E/^Y)?"), sub); 4384 _("replace with %s (y/n/a/q/l/^E/^Y)?"), sub);
4385 msg_no_more = FALSE; 4385 msg_no_more = FALSE;
4386 msg_scroll = i; 4386 msg_scroll = i;
4387 showruler(TRUE); 4387 showruler(TRUE);
4388 windgoto(msg_row, msg_col); 4388 windgoto(msg_row, msg_col);
4389 RedrawingDisabled = temp; 4389 RedrawingDisabled = save_RedrawingDisabled;
4390 4390
4391 #ifdef USE_ON_FLY_SCROLL 4391 #ifdef USE_ON_FLY_SCROLL
4392 dont_scroll = FALSE; // allow scrolling here 4392 dont_scroll = FALSE; // allow scrolling here
4393 #endif 4393 #endif
4394 ++no_mapping; // don't map this key 4394 ++no_mapping; // don't map this key