From 7a710f5f0840724b7352ab36cfa9b8db5d533657 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Sat, 4 Feb 2023 00:17:04 +0100 Subject: fix(column): no longer reset nrwidth_line_count for 'statuscolumn' Problem: We still explicitly reset `nrwidth_line_count` when changing `'number'` or `'relativenumber'` but this is no longer needed since the introduction of a `statuscol_line_count`. Solution: Remove reset of `nrwidth_line_count`. Resolve https://github.com/neovim/neovim/pull/22094#issuecomment-1416168926. --- src/nvim/option.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/nvim/option.c b/src/nvim/option.c index 387b94533c..fd58ebd6fe 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2158,9 +2158,6 @@ static char *set_bool_option(const int opt_idx, char_u *const varp, const int va if (curwin->w_p_spell) { errmsg = did_set_spelllang(curwin); } - } else if (((int *)varp == &curwin->w_p_nu || (int *)varp == &curwin->w_p_rnu) - && *curwin->w_p_stc != NUL) { // '(relative)number' + 'statuscolumn' - curwin->w_nrwidth_line_count = 0; } if ((int *)varp == &curwin->w_p_arab) { -- cgit