diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-01-03 13:31:39 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-01-08 14:37:55 +0100 |
commit | aeb053907d2f27713764e345b00a6618e23220d8 (patch) | |
tree | dd881a61c8c515600b201ed2685ec6ae591f42f9 /src/nvim/option.c | |
parent | fbe40caa7cc1786dc58210a82901307417ba0654 (diff) | |
download | rneovim-aeb053907d2f27713764e345b00a6618e23220d8.tar.gz rneovim-aeb053907d2f27713764e345b00a6618e23220d8.tar.bz2 rneovim-aeb053907d2f27713764e345b00a6618e23220d8.zip |
refactor(options): use schar_T representation for fillchars and listchars
A bit big, but practically it was a lot simpler to change over all
fillchars and all listchars at once, to not need to maintain two
parallel implementations.
This is mostly an internal refactor, but it also removes an arbitrary
limitation: that 'fillchars' and 'listchars' values can only be
single-codepoint characters. Now any character which fits into a single
screen cell can be used.
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 495a6819f9..a46e6fed34 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1696,10 +1696,10 @@ static void didset_options2(void) highlight_changed(); // Parse default for 'fillchars'. - set_fillchars_option(curwin, curwin->w_p_fcs, true); + set_chars_option(curwin, curwin->w_p_fcs, kFillchars, true); // Parse default for 'listchars'. - set_listchars_option(curwin, curwin->w_p_lcs, true); + set_chars_option(curwin, curwin->w_p_lcs, kListchars, true); // Parse default for 'wildmode'. check_opt_wim(); @@ -4991,8 +4991,8 @@ void didset_window_options(win_T *wp, bool valid_cursor) check_colorcolumn(wp); briopt_check(wp); fill_culopt_flags(NULL, wp); - set_fillchars_option(wp, wp->w_p_fcs, true); - set_listchars_option(wp, wp->w_p_lcs, true); + set_chars_option(wp, wp->w_p_fcs, kFillchars, true); + set_chars_option(wp, wp->w_p_lcs, kListchars, true); parse_winhl_opt(wp); // sets w_hl_needs_update also for w_p_winbl check_blending(wp); set_winbar_win(wp, false, valid_cursor); |