summaryrefslogtreecommitdiffstats
path: root/src/mbyte.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-09 12:53:14 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-09 12:53:14 +0100
commit8ca29b6a3599b82b8822b7697cad63d0244c2d59 (patch)
tree9abef23b2de61a59e95a317edc9cabdf40425637 /src/mbyte.c
parentafa23d1b99692e3c726eb694933ab348b442a1e4 (diff)
patch 9.0.0176: checking character options is duplicated and incompletev9.0.0176
Problem: Checking character options is duplicated and incomplete. Solution: Move checking to check_chars_options(). (closes #10863)
Diffstat (limited to 'src/mbyte.c')
-rw-r--r--src/mbyte.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/src/mbyte.c b/src/mbyte.c
index 691c1608e3..941411b4a9 100644
--- a/src/mbyte.c
+++ b/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));