mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 9.0.0176: checking character options is duplicated and incomplete
Problem: Checking character options is duplicated and incomplete. Solution: Move checking to check_chars_options(). (closes #10863)
This commit is contained in:
28
src/mbyte.c
28
src/mbyte.c
@@ -5645,31 +5645,9 @@ f_setcellwidths(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
cw_table = table;
|
||||
cw_table_size = l->lv_len;
|
||||
|
||||
// Check that the new value does not conflict with 'fillchars' or
|
||||
// 'listchars'.
|
||||
if (set_chars_option(curwin, &p_fcs, FALSE) != NULL)
|
||||
error = e_conflicts_with_value_of_fillchars;
|
||||
else if (set_chars_option(curwin, &p_lcs, FALSE) != NULL)
|
||||
error = e_conflicts_with_value_of_listchars;
|
||||
else
|
||||
{
|
||||
tabpage_T *tp;
|
||||
win_T *wp;
|
||||
|
||||
FOR_ALL_TAB_WINDOWS(tp, wp)
|
||||
{
|
||||
if (set_chars_option(wp, &wp->w_p_lcs, FALSE) != NULL)
|
||||
{
|
||||
error = e_conflicts_with_value_of_listchars;
|
||||
break;
|
||||
}
|
||||
if (set_chars_option(wp, &wp->w_p_fcs, FALSE) != NULL)
|
||||
{
|
||||
error = e_conflicts_with_value_of_fillchars;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Check that the new value does not conflict with 'listchars' or
|
||||
// 'fillchars'.
|
||||
error = check_chars_options();
|
||||
if (error != NULL)
|
||||
{
|
||||
emsg(_(error));
|
||||
|
Reference in New Issue
Block a user