forked from aniani/vim
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)
This commit is contained in:
11
src/option.c
11
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user