summaryrefslogtreecommitdiffstats
path: root/src/option.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-03-10 13:40:08 +0100
committerBram Moolenaar <Bram@vim.org>2021-03-10 13:40:08 +0100
commit37294bd6a2afbf0fc8a1c34cbe102336b0bd0a82 (patch)
treec0a34b9f1c02015af208be03a2d27920ac1a64f0 /src/option.c
parente3ffcd9902efc756178900d9bd972c74a09c3fcd (diff)
patch 8.2.2581: Vim9: sourcing Vim9 script triggers a redrawv8.2.2581
Problem: Vim9: sourcing Vim9 script triggers a redraw. Solution: Do not let setting/restoring 'cpoptions' cause a redraw. (closes #7920)
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/option.c b/src/option.c
index 9db9c2633f..b9d7edbbb0 100644
--- a/src/option.c
+++ b/src/option.c
@@ -3176,7 +3176,9 @@ set_bool_option(
if (curwin->w_curswant != MAXCOL
&& (options[opt_idx].flags & (P_CURSWANT | P_RALL)) != 0)
curwin->w_set_curswant = TRUE;
- check_redraw(options[opt_idx].flags);
+
+ if ((opt_flags & OPT_NO_REDRAW) == 0)
+ check_redraw(options[opt_idx].flags);
return NULL;
}
@@ -3192,8 +3194,8 @@ set_num_option(
long value, // new value
char *errbuf, // buffer for error messages
size_t errbuflen, // length of "errbuf"
- int opt_flags) // OPT_LOCAL, OPT_GLOBAL and
- // OPT_MODELINE
+ int opt_flags) // OPT_LOCAL, OPT_GLOBAL,
+ // OPT_MODELINE, etc.
{
char *errmsg = NULL;
long old_value = *(long *)varp;
@@ -3734,7 +3736,8 @@ set_num_option(
if (curwin->w_curswant != MAXCOL
&& (options[opt_idx].flags & (P_CURSWANT | P_RALL)) != 0)
curwin->w_set_curswant = TRUE;
- check_redraw(options[opt_idx].flags);
+ if ((opt_flags & OPT_NO_REDRAW) == 0)
+ check_redraw(options[opt_idx].flags);
return errmsg;
}