mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
fix(column): issues with 'statuscolumn' width (#22542)
Problem: 'statuscolumn' width can be incorrect when toggling 'number' or setting 'statuscolumn'. Solution: Make sure the width is reset and re-estimated when 'statuscolumn' and 'number' are set. (When 'relativenumber' is set this already happens because it always changes "nrwidth_line_count".)
This commit is contained in:
@@ -1199,6 +1199,7 @@ static void did_set_statusline(win_T *win, char **varp, char **gvarp, char **err
|
||||
ru_wid = 0;
|
||||
} else if (varp == &win->w_p_stc) {
|
||||
win->w_nrwidth_line_count = 0;
|
||||
win->w_statuscol_line_count = 0;
|
||||
}
|
||||
char *s = *varp;
|
||||
if (varp == &p_ruf && *s == '%') {
|
||||
|
Reference in New Issue
Block a user