comparison src/autocmd.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 6e96bd314ffe
children 35fea638cd29
comparison
equal deleted inserted replaced
32478:8117806f2947 32479:87f59a64efab
1600 // Prevent chdir() call in win_enter_ext(), through do_autochdir(). 1600 // Prevent chdir() call in win_enter_ext(), through do_autochdir().
1601 save_acd = p_acd; 1601 save_acd = p_acd;
1602 p_acd = FALSE; 1602 p_acd = FALSE;
1603 #endif 1603 #endif
1604 1604
1605 // no redrawing and don't set the window title
1606 ++RedrawingDisabled;
1607 (void)win_split_ins(0, WSP_TOP, auc_win, 0); 1605 (void)win_split_ins(0, WSP_TOP, auc_win, 0);
1608 --RedrawingDisabled;
1609 (void)win_comp_pos(); // recompute window positions 1606 (void)win_comp_pos(); // recompute window positions
1610 p_ea = save_ea; 1607 p_ea = save_ea;
1611 #ifdef FEAT_AUTOCHDIR 1608 #ifdef FEAT_AUTOCHDIR
1612 p_acd = save_acd; 1609 p_acd = save_acd;
1613 #endif 1610 #endif
2332 // delete from active_apc_list 2329 // delete from active_apc_list
2333 if (active_apc_list == &patcmd) // just in case 2330 if (active_apc_list == &patcmd) // just in case
2334 active_apc_list = patcmd.next; 2331 active_apc_list = patcmd.next;
2335 } 2332 }
2336 2333
2337 --RedrawingDisabled; 2334 if (RedrawingDisabled > 0)
2335 --RedrawingDisabled;
2338 autocmd_busy = save_autocmd_busy; 2336 autocmd_busy = save_autocmd_busy;
2339 filechangeshell_busy = FALSE; 2337 filechangeshell_busy = FALSE;
2340 autocmd_nested = save_autocmd_nested; 2338 autocmd_nested = save_autocmd_nested;
2341 vim_free(SOURCING_NAME); 2339 vim_free(SOURCING_NAME);
2342 ESTACK_CHECK_NOW; 2340 ESTACK_CHECK_NOW;