@@ -550,7 +550,8 @@ do_exmode(
550550#ifdef FEAT_GUI
551551 -- hold_gui_events ;
552552#endif
553- -- RedrawingDisabled ;
553+ if (RedrawingDisabled > 0 )
554+ -- RedrawingDisabled ;
554555 -- no_wait_return ;
555556 update_screen (UPD_CLEAR );
556557 need_wait_return = FALSE;
@@ -631,7 +632,7 @@ do_cmdline(
631632 static int recursive = 0 ; // recursive depth
632633 int msg_didout_before_start = 0 ;
633634 int count = 0 ; // line number count
634- int did_inc = FALSE; // incremented RedrawingDisabled
635+ int did_inc_RedrawingDisabled = FALSE;
635636 int retval = OK ;
636637#ifdef FEAT_EVAL
637638 cstack_T cstack ; // conditional stack
@@ -977,7 +978,7 @@ do_cmdline(
977978 msg_scroll = TRUE; // put messages below each other
978979 ++ no_wait_return ; // don't wait for return until finished
979980 ++ RedrawingDisabled ;
980- did_inc = TRUE;
981+ did_inc_RedrawingDisabled = TRUE;
981982 }
982983 }
983984
@@ -1336,9 +1337,10 @@ do_cmdline(
13361337 * hit return before redrawing the screen. With the ":global" command we do
13371338 * this only once after the command is finished.
13381339 */
1339- if (did_inc )
1340+ if (did_inc_RedrawingDisabled )
13401341 {
1341- -- RedrawingDisabled ;
1342+ if (RedrawingDisabled > 0 )
1343+ -- RedrawingDisabled ;
13421344 -- no_wait_return ;
13431345 msg_scroll = FALSE;
13441346
@@ -7170,7 +7172,7 @@ do_exedit(
71707172
71717173 if (exmode_was != EXMODE_VIM )
71727174 settmode (TMODE_RAW );
7173- int save_rd = RedrawingDisabled ;
7175+ int save_RedrawingDisabled = RedrawingDisabled ;
71747176 RedrawingDisabled = 0 ;
71757177 int save_nwr = no_wait_return ;
71767178 no_wait_return = 0 ;
@@ -7187,7 +7189,7 @@ do_exedit(
71877189 main_loop (FALSE, TRUE);
71887190
71897191 pending_exmode_active = FALSE;
7190- RedrawingDisabled = save_rd ;
7192+ RedrawingDisabled = save_RedrawingDisabled ;
71917193 no_wait_return = save_nwr ;
71927194 msg_scroll = save_ms ;
71937195#ifdef FEAT_GUI
@@ -8438,11 +8440,12 @@ ex_redraw(exarg_T *eap)
84388440 void
84398441redraw_cmd (int clear )
84408442{
8441- int r = RedrawingDisabled ;
8442- int p = p_lz ;
8443-
8443+ int save_RedrawingDisabled = RedrawingDisabled ;
84448444 RedrawingDisabled = 0 ;
8445+
8446+ int save_p_lz = p_lz ;
84458447 p_lz = FALSE;
8448+
84468449 validate_cursor ();
84478450 update_topline ();
84488451 update_screen (clear ? UPD_CLEAR : VIsual_active ? UPD_INVERTED : 0 );
@@ -8454,8 +8457,8 @@ redraw_cmd(int clear)
84548457# endif
84558458 resize_console_buf ();
84568459#endif
8457- RedrawingDisabled = r ;
8458- p_lz = p ;
8460+ RedrawingDisabled = save_RedrawingDisabled ;
8461+ p_lz = save_p_lz ;
84598462
84608463 // After drawing the statusline screen_attr may still be set.
84618464 screen_stop_highlight ();
@@ -8480,24 +8483,25 @@ redraw_cmd(int clear)
84808483 static void
84818484ex_redrawstatus (exarg_T * eap UNUSED )
84828485{
8483- int r = RedrawingDisabled ;
8484- int p = p_lz ;
8485-
84868486 if (eap -> forceit )
84878487 status_redraw_all ();
84888488 else
84898489 status_redraw_curbuf ();
84908490 if (msg_scrolled && (State & MODE_CMDLINE ))
84918491 return ; // redraw later
84928492
8493+ int save_RedrawingDisabled = RedrawingDisabled ;
84938494 RedrawingDisabled = 0 ;
8495+
8496+ int save_p_lz = p_lz ;
84948497 p_lz = FALSE;
8498+
84958499 if (State & MODE_CMDLINE )
84968500 redraw_statuslines ();
84978501 else
84988502 update_screen (VIsual_active ? UPD_INVERTED : 0 );
8499- RedrawingDisabled = r ;
8500- p_lz = p ;
8503+ RedrawingDisabled = save_RedrawingDisabled ;
8504+ p_lz = save_p_lz ;
85018505 out_flush ();
85028506}
85038507
@@ -8507,16 +8511,16 @@ ex_redrawstatus(exarg_T *eap UNUSED)
85078511 static void
85088512ex_redrawtabline (exarg_T * eap UNUSED )
85098513{
8510- int r = RedrawingDisabled ;
8511- int p = p_lz ;
8512-
8514+ int save_RedrawingDisabled = RedrawingDisabled ;
85138515 RedrawingDisabled = 0 ;
8516+
8517+ int save_p_lz = p_lz ;
85148518 p_lz = FALSE;
85158519
85168520 draw_tabline ();
85178521
8518- RedrawingDisabled = r ;
8519- p_lz = p ;
8522+ RedrawingDisabled = save_RedrawingDisabled ;
8523+ p_lz = save_p_lz ;
85208524 out_flush ();
85218525}
85228526
0 commit comments