comparison src/mbyte.c @ 29395:caaf5b270018 v9.0.0040

patch 9.0.0040: use of set_chars_option() is confusing Commit: https://github.com/vim/vim/commit/b67f0c8e495cfbfc09d6c7ff670b8162faf07b01 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jul 4 21:03:36 2022 +0100 patch 9.0.0040: use of set_chars_option() is confusing Problem: Use of set_chars_option() is confusing. Solution: Add "apply" argument to store the result or not. Merge similar code.
author Bram Moolenaar <Bram@vim.org>
date Mon, 04 Jul 2022 22:15:03 +0200
parents 9dce192d1ac2
children 6b8aaf16af99
comparison
equal deleted inserted replaced
29394:aa2921440d74 29395:caaf5b270018
5645 cw_table = table; 5645 cw_table = table;
5646 cw_table_size = l->lv_len; 5646 cw_table_size = l->lv_len;
5647 5647
5648 // Check that the new value does not conflict with 'fillchars' or 5648 // Check that the new value does not conflict with 'fillchars' or
5649 // 'listchars'. 5649 // 'listchars'.
5650 if (set_chars_option(curwin, &p_fcs) != NULL) 5650 if (set_chars_option(curwin, &p_fcs, FALSE) != NULL)
5651 error = e_conflicts_with_value_of_fillchars; 5651 error = e_conflicts_with_value_of_fillchars;
5652 else if (set_chars_option(curwin, &p_lcs) != NULL) 5652 else if (set_chars_option(curwin, &p_lcs, FALSE) != NULL)
5653 error = e_conflicts_with_value_of_listchars; 5653 error = e_conflicts_with_value_of_listchars;
5654 else 5654 else
5655 { 5655 {
5656 tabpage_T *tp; 5656 tabpage_T *tp;
5657 win_T *wp; 5657 win_T *wp;
5658 5658
5659 FOR_ALL_TAB_WINDOWS(tp, wp) 5659 FOR_ALL_TAB_WINDOWS(tp, wp)
5660 { 5660 {
5661 if (set_chars_option(wp, &wp->w_p_lcs) != NULL) 5661 if (set_chars_option(wp, &wp->w_p_lcs, FALSE) != NULL)
5662 { 5662 {
5663 error = e_conflicts_with_value_of_listchars; 5663 error = e_conflicts_with_value_of_listchars;
5664 break; 5664 break;
5665 } 5665 }
5666 if (set_chars_option(wp, &wp->w_p_fcs) != NULL) 5666 if (set_chars_option(wp, &wp->w_p_fcs, FALSE) != NULL)
5667 { 5667 {
5668 error = e_conflicts_with_value_of_fillchars; 5668 error = e_conflicts_with_value_of_fillchars;
5669 break; 5669 break;
5670 } 5670 }
5671 } 5671 }