aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2021-09-22 11:03:34 -0600
committerJosh Rahm <rahm@google.com>2022-01-11 14:12:30 -0700
commit74895adbe461e56b3472408a5acc08ee19833b85 (patch)
tree604d848bc6c12e53af34a4168b0b15ffa90034dc
parentaba03932eeade5af887355d6fadb58ad0dda6b89 (diff)
downloadrneovim-74895adbe461e56b3472408a5acc08ee19833b85.tar.gz
rneovim-74895adbe461e56b3472408a5acc08ee19833b85.tar.bz2
rneovim-74895adbe461e56b3472408a5acc08ee19833b85.zip
Move colorcolumn character option to fillchars.
listchars is not the right place for it.
-rw-r--r--src/nvim/buffer_defs.h2
-rw-r--r--src/nvim/option.c2
-rw-r--r--src/nvim/screen.c2
-rw-r--r--test/functional/ui/highlight_spec.lua7
4 files changed, 7 insertions, 6 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h
index 575de4d0cb..d5fb2df52b 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 8846a26849..80f74f9d4a 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -3542,6 +3542,7 @@ static char *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 },
@@ -3553,7 +3554,6 @@ static char *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 f083065b4c..3c91d764bf 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -4182,7 +4182,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 0983d0d4ad..255180bba8 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -868,13 +868,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)