patch 8.2.2581: Vim9: sourcing Vim9 script triggers a redraw
Problem: Vim9: sourcing Vim9 script triggers a redraw.
Solution: Do not let setting/restoring 'cpoptions' cause a redraw.
(closes #7920)
diff --git a/src/vim9script.c b/src/vim9script.c
index 5ce7c3b..cd60b25 100644
--- a/src/vim9script.c
+++ b/src/vim9script.c
@@ -75,7 +75,7 @@
if (STRCMP(p_cpo, CPO_VIM) != 0)
{
si->sn_save_cpo = vim_strsave(p_cpo);
- set_option_value((char_u *)"cpo", 0L, (char_u *)CPO_VIM, 0);
+ set_option_value((char_u *)"cpo", 0L, (char_u *)CPO_VIM, OPT_NO_REDRAW);
}
#else
// No check for this being the first command, it doesn't matter.