diff options
author | Josh Rahm <rahm@google.com> | 2021-09-22 11:03:34 -0600 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2021-10-05 02:22:00 -0600 |
commit | 7090d668776f9d45e8d66ede9690122625bc88d0 (patch) | |
tree | 37082efafc8e485b4256086b0cfd546819d66493 | |
parent | 2bd8a5e4b77367c29f3c9ed2091023dc69f35239 (diff) | |
download | rneovim-7090d668776f9d45e8d66ede9690122625bc88d0.tar.gz rneovim-7090d668776f9d45e8d66ede9690122625bc88d0.tar.bz2 rneovim-7090d668776f9d45e8d66ede9690122625bc88d0.zip |
Move colorcolumn character option to fillchars.
listchars is not the right place for it.
-rw-r--r-- | src/nvim/buffer_defs.h | 2 | ||||
-rw-r--r-- | src/nvim/option.c | 2 | ||||
-rw-r--r-- | src/nvim/screen.c | 2 | ||||
-rw-r--r-- | test/functional/ui/highlight_spec.lua | 7 |
4 files changed, 7 insertions, 6 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h index 2db5a95304..f42293b137 100644 --- a/src/nvim/buffer_defs.h +++ b/src/nvim/buffer_defs.h @@ -1231,7 +1231,6 @@ struct window_S { int trail; int *multispace; int conceal; - int colorcol; } w_p_lcs_chars; // 'fillchars' characters. Defaults set in set_chars_option(). @@ -1246,6 +1245,7 @@ struct window_S { int diff; int msgsep; int eob; + int colorcol; } w_p_fcs_chars; /* diff --git a/src/nvim/option.c b/src/nvim/option.c index f7c667dfb7..d88467b57f 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3463,6 +3463,7 @@ static char_u *set_chars_option(win_T *wp, char_u **varp, bool set) { &wp->w_p_fcs_chars.diff, "diff", '-' }, { &wp->w_p_fcs_chars.msgsep, "msgsep", ' ' }, { &wp->w_p_fcs_chars.eob, "eob", '~' }, + { &wp->w_p_fcs_chars.colorcol, "colorcol", NUL }, }; struct chars_tab lcs_tab[] = { { &wp->w_p_lcs_chars.eol, "eol", NUL }, @@ -3474,7 +3475,6 @@ static char_u *set_chars_option(win_T *wp, char_u **varp, bool set) { &wp->w_p_lcs_chars.lead, "lead", NUL }, { &wp->w_p_lcs_chars.trail, "trail", NUL }, { &wp->w_p_lcs_chars.conceal, "conceal", NUL }, - { &wp->w_p_lcs_chars.colorcol, "colorcol", NUL }, }; if (varp == &p_lcs || varp == &wp->w_p_lcs) { diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 155f706699..36266a00f0 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -4142,7 +4142,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc } else if (draw_color_col && VCOL_HLC == *color_cols) { col_attr = mc_attr; // Draw the colorcolumn character. - c = wp->w_p_lcs_chars.colorcol; + c = wp->w_p_fcs_chars.colorcol; schar_from_char(linebuf_char[off], c); } diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua index c00d30fe32..95de31fb6d 100644 --- a/test/functional/ui/highlight_spec.lua +++ b/test/functional/ui/highlight_spec.lua @@ -850,13 +850,14 @@ describe('CursorLine highlight', function() | ]]) + command('set fillchars+=colorcol:│') command('set colorcolumn=3') feed('i <esc>') screen:expect([[ - {1:{} {7: } | + {1:{} {7:│} | "{2:a}{7:"} : {3:abc} {3:// 10;} | - {1:}} {7: } | - {5: ^ }{7: }{5: }| + {1:}} {7:│} | + {5: ^ }{7:│}{5: }| | ]]) end) |