diff options
author | erw7 <erw7.github@gmail.com> | 2020-07-14 05:15:04 +0900 |
---|---|---|
committer | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2020-07-23 10:29:36 +0900 |
commit | bfe94d0a0814eab5e9f9b6c6b06e770ba904da9f (patch) | |
tree | b4cfe764073ba6bffe541f55d89376d1c47c38cb /src/nvim/option.c | |
parent | d3eddcf630f29da72409934eb14fb7a534f6497e (diff) | |
download | rneovim-bfe94d0a0814eab5e9f9b6c6b06e770ba904da9f.tar.gz rneovim-bfe94d0a0814eab5e9f9b6c6b06e770ba904da9f.tar.bz2 rneovim-bfe94d0a0814eab5e9f9b6c6b06e770ba904da9f.zip |
vim-patch:8.1.1623: display wrong with signs in narrow number column
Problem: Display wrong with signs in narrow number column.
Solution: Increase the numbercolumn width if needed. (Yegappan Lakshmanan,
closes vim/vim#4606)
https://github.com/vim/vim/commit/e4b407f536ba8bd007152649a347a95320d80fce
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 4157d28894..97f31b4754 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3183,6 +3183,13 @@ ambw_end: 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; + } } else if (varp == &curwin->w_p_fdc || varp == &curwin->w_allbuf_opt.wo_fdc) { // 'foldcolumn' if (check_opt_strings(*varp, p_fdc_values, false) != OK) { |