diff options
author | luukvbaal <31730729+luukvbaal@users.noreply.github.com> | 2023-03-19 10:21:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-19 09:21:49 +0000 |
commit | eeac80de0cf45951dd696f82e5a823c6de20728c (patch) | |
tree | cfd7fd886c8dd701d84f3edc1220c8f86211faf5 /src/nvim/option.c | |
parent | 204a8b17c8ebab1619cc47a920a06dcc348d75f7 (diff) | |
download | rneovim-eeac80de0cf45951dd696f82e5a823c6de20728c.tar.gz rneovim-eeac80de0cf45951dd696f82e5a823c6de20728c.tar.bz2 rneovim-eeac80de0cf45951dd696f82e5a823c6de20728c.zip |
fix(column): invalidate statuscolumn width when UPD_NOT_VALID (#22723)
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 02b32b1fe5..0aa2f8ab04 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2176,8 +2176,10 @@ static char *set_bool_option(const int opt_idx, char *const varp, const int valu if (curwin->w_p_spell) { errmsg = did_set_spelllang(curwin); } - } else if ((int *)varp == &curwin->w_p_nu) { // 'number' - invalidate_statuscol(curwin, NULL); + } else if ((int *)varp == &curwin->w_p_nu && *curwin->w_p_stc != NUL) { + // When 'statuscolumn' is set and 'number' is changed: + curwin->w_nrwidth_line_count = 0; // make sure width is reset + curwin->w_statuscol_line_count = 0; // make sure width is re-estimated } if ((int *)varp == &curwin->w_p_arab) { |