mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
fix(column): rebuild status column when sign column is invalid
This commit is contained in:
@@ -2189,9 +2189,8 @@ static const char *set_bool_option(const int opt_idx, char *const varp, const in
|
||||
errmsg = did_set_spelllang(curwin);
|
||||
}
|
||||
} 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
|
||||
// When 'number' is changed and 'statuscolumn' is set, make sure width is reset.
|
||||
curwin->w_nrwidth_line_count = 0;
|
||||
}
|
||||
|
||||
if ((int *)varp == &curwin->w_p_arab) {
|
||||
@@ -5531,6 +5530,13 @@ int win_signcol_configured(win_T *wp, int *is_fixed)
|
||||
if (*scl == 'n'
|
||||
&& (*(scl + 1) == 'o' || (*(scl + 1) == 'u'
|
||||
&& (wp->w_p_nu || wp->w_p_rnu)))) {
|
||||
if (!wp->w_buffer->b_signcols.valid) {
|
||||
FOR_ALL_WINDOWS_IN_TAB(win, curtab) {
|
||||
if (*win->w_p_stc != NUL) {
|
||||
win->w_nrwidth_line_count = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (*wp->w_p_stc != NUL) {
|
||||
buf_signcols(wp->w_buffer, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user