diff src/optionstr.c @ 24079:a9ff8368d35f v8.2.2581

patch 8.2.2581: Vim9: sourcing Vim9 script triggers a redraw Commit: https://github.com/vim/vim/commit/37294bd6a2afbf0fc8a1c34cbe102336b0bd0a82 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 10 13:40:08 2021 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Wed, 10 Mar 2021 13:45:03 +0100
parents 44be09b25619
children a56f9c2ba51c
line wrap: on
line diff
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -2461,11 +2461,14 @@ ambw_end:
 		   && (get_option_flags(opt_idx) & (P_CURSWANT | P_RALL)) != 0)
 	curwin->w_set_curswant = TRUE;
 
+    if ((opt_flags & OPT_NO_REDRAW) == 0)
+    {
 #ifdef FEAT_GUI
-    // check redraw when it's not a GUI option or the GUI is active.
-    if (!redraw_gui_only || gui.in_use)
+	// check redraw when it's not a GUI option or the GUI is active.
+	if (!redraw_gui_only || gui.in_use)
 #endif
-	check_redraw(get_option_flags(opt_idx));
+	    check_redraw(get_option_flags(opt_idx));
+    }
 
 #if defined(FEAT_VTP) && defined(FEAT_TERMGUICOLORS)
     if (did_swaptcap)