diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-07-04 21:03:36 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-04 21:03:36 +0100 |
commit | b67f0c8e495cfbfc09d6c7ff670b8162faf07b01 (patch) | |
tree | a2ac931d3af9d6aae328acef53475e9717791aa0 /src/mbyte.c | |
parent | 4c99e622ddd1cc0527262fda3b93e8e70f017371 (diff) | |
download | vim-git-b67f0c8e495cfbfc09d6c7ff670b8162faf07b01.tar.gz |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index 1e3ef72a3..691c1608e 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; |