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)
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 595286a..fbda2cc 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4545,7 +4545,7 @@
if (restart_edit != 0) // autocmd with ":startinsert"
stuffcharReadbuff(K_NOP);
- i = RedrawingDisabled;
+ int save_RedrawingDisabled = RedrawingDisabled;
RedrawingDisabled = 0;
/*
@@ -4553,7 +4553,7 @@
*/
main_loop(TRUE, FALSE);
- RedrawingDisabled = i;
+ RedrawingDisabled = save_RedrawingDisabled;
# ifdef FEAT_FOLDING
save_KeyTyped = KeyTyped;