summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/option.c b/src/option.c
index cd50e8d62..4856a598d 100644
--- a/src/option.c
+++ b/src/option.c
@@ -7454,11 +7454,17 @@ did_set_string_option(
#endif /* FEAT_INS_EXPAND */
#ifdef FEAT_SIGNS
- /* 'signcolumn' */
+ // 'signcolumn'
else if (varp == &curwin->w_p_scl)
{
if (check_opt_strings(*varp, p_scl_values, FALSE) != OK)
errmsg = e_invarg;
+ // When changing the 'signcolumn' to or from 'number', recompute the
+ // width of the number column if 'number' or 'relativenumber' is set.
+ if (((*oldval == 'n' && *(oldval + 1) == 'u')
+ || (*curwin->w_p_scl == 'n' && *(curwin->w_p_scl + 1) =='u'))
+ && (curwin->w_p_nu || curwin->w_p_rnu))
+ curwin->w_nrwidth_line_count = 0;
}
#endif