diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-08 12:08:28 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-08-08 20:03:40 +0800 |
commit | 9fedb6fd783b9ac48239bc7574779118eec3729a (patch) | |
tree | 7d8cb54de0dc1fc4ad9ddac1715cf3f34bdd329a /src/nvim/option.c | |
parent | 01a7009af9f7bbf5f1b38c82956caf67a7c8bcca (diff) | |
download | rneovim-9fedb6fd783b9ac48239bc7574779118eec3729a.tar.gz rneovim-9fedb6fd783b9ac48239bc7574779118eec3729a.tar.bz2 rneovim-9fedb6fd783b9ac48239bc7574779118eec3729a.zip |
vim-patch:8.2.3545: setcellwidths() may make 'listchars' or 'fillchars' invalid
Problem: setcellwidths() may make 'listchars' or 'fillchars' invalid.
Solution: Check the value and give an error. (closes vim/vim#9024)
https://github.com/vim/vim/commit/94358a1e6e640ca5ebeb295efdddd4e92b700673
Cherry-pick f_setcellwidths() change from patch 9.0.0036.
Cherry-pick 'ambiwidth' docs update from runtime update 079ba76ae7a7.
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 12c5889703..3ab1a32eeb 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2580,11 +2580,11 @@ static char *did_set_string_option(int opt_idx, char_u **varp, char_u *oldval, c } else { FOR_ALL_TAB_WINDOWS(tp, wp) { if (set_chars_option(wp, &wp->w_p_lcs, true) != NULL) { - errmsg = _("E834: Conflicts with value of 'listchars'"); + errmsg = _(e_conflicts_with_value_of_listchars); goto ambw_end; } if (set_chars_option(wp, &wp->w_p_fcs, true) != NULL) { - errmsg = _("E835: Conflicts with value of 'fillchars'"); + errmsg = _(e_conflicts_with_value_of_fillchars); goto ambw_end; } } @@ -3605,7 +3605,7 @@ static int get_encoded_char_adv(char_u **p) /// /// @param varp either &curwin->w_p_lcs or &curwin->w_p_fcs /// @return error message, NULL if it's OK. -static char *set_chars_option(win_T *wp, char_u **varp, bool set) +char *set_chars_option(win_T *wp, char_u **varp, bool set) { int round, i, len, len2, entries; char_u *p, *s; |