diff options
author | luukvbaal <31730729+luukvbaal@users.noreply.github.com> | 2023-01-09 18:12:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 17:12:06 +0000 |
commit | 364b131f42509326c912c9b0fef5dfc94ed23b41 (patch) | |
tree | 654f24fde95819257002aa9b36990efd6a80535c /src/nvim/optionstr.c | |
parent | 50f03773f4b9f4638489ccfd0503dc9e39e5de78 (diff) | |
download | rneovim-364b131f42509326c912c9b0fef5dfc94ed23b41.tar.gz rneovim-364b131f42509326c912c9b0fef5dfc94ed23b41.tar.bz2 rneovim-364b131f42509326c912c9b0fef5dfc94ed23b41.zip |
feat(ui): add 'statuscolumn' option
Problem: Unable to customize the column next to a window ('gutter').
Solution: Add 'statuscolumn' option that follows the 'statusline' syntax,
allowing to customize the status column. Also supporting the %@
click execute function label. Adds new items @C and @s which
will print the fold and sign columns. Line numbers and signs
can be clicked, highlighted, aligned, transformed, margined etc.
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r-- | src/nvim/optionstr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index 0c9d428ce7..a97e9b7c7e 100644 --- a/src/nvim/optionstr.c +++ b/src/nvim/optionstr.c @@ -1177,12 +1177,14 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf redraw_titles(); } } else if (gvarp == &p_stl || gvarp == &p_wbr || varp == &p_tal - || varp == &p_ruf) { - // 'statusline', 'winbar', 'tabline' or 'rulerformat' + || varp == &p_ruf || varp == &curwin->w_p_stc) { + // 'statusline', 'winbar', 'tabline', 'rulerformat' or 'statuscolumn' int wid; if (varp == &p_ruf) { // reset ru_wid first ru_wid = 0; + } else if (varp == &curwin->w_p_stc) { + curwin->w_nrwidth_line_count = 0; } s = *varp; if (varp == &p_ruf && *s == '%') { @@ -1197,7 +1199,8 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf errmsg = check_stl_option(p_ruf); } } else if (varp == &p_ruf || s[0] != '%' || s[1] != '!') { - // check 'statusline', 'winbar' or 'tabline' only if it doesn't start with "%!" + // check 'statusline', 'winbar', 'tabline' or 'statuscolumn' + // only if it doesn't start with "%!" errmsg = check_stl_option(s); } if (varp == &p_ruf && errmsg == NULL) { |