summaryrefslogtreecommitdiffstats
path: root/src/mbyte.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-07-04 21:03:36 +0100
committerBram Moolenaar <Bram@vim.org>2022-07-04 21:03:36 +0100
commitb67f0c8e495cfbfc09d6c7ff670b8162faf07b01 (patch)
treea2ac931d3af9d6aae328acef53475e9717791aa0 /src/mbyte.c
parent4c99e622ddd1cc0527262fda3b93e8e70f017371 (diff)
patch 9.0.0040: use of set_chars_option() is confusingv9.0.0040
Problem: Use of set_chars_option() is confusing. Solution: Add "apply" argument to store the result or not. Merge similar code.
Diffstat (limited to 'src/mbyte.c')
-rw-r--r--src/mbyte.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbyte.c b/src/mbyte.c
index 1e3ef72a36..691c1608e3 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -5647,9 +5647,9 @@ f_setcellwidths(typval_T *argvars, typval_T *rettv UNUSED)
// Check that the new value does not conflict with 'fillchars' or
// 'listchars'.
- if (set_chars_option(curwin, &p_fcs) != NULL)
+ if (set_chars_option(curwin, &p_fcs, FALSE) != NULL)
error = e_conflicts_with_value_of_fillchars;
- else if (set_chars_option(curwin, &p_lcs) != NULL)
+ else if (set_chars_option(curwin, &p_lcs, FALSE) != NULL)
error = e_conflicts_with_value_of_listchars;
else
{
@@ -5658,12 +5658,12 @@ f_setcellwidths(typval_T *argvars, typval_T *rettv UNUSED)
FOR_ALL_TAB_WINDOWS(tp, wp)
{
- if (set_chars_option(wp, &wp->w_p_lcs) != NULL)
+ 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) != NULL)
+ if (set_chars_option(wp, &wp->w_p_fcs, FALSE) != NULL)
{
error = e_conflicts_with_value_of_fillchars;
break;