Mercurial > vim
diff src/option.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 | 9908c07ccb56 |
line wrap: on
line diff
--- a/src/option.c +++ b/src/option.c @@ -2433,10 +2433,10 @@ didset_options2(void) check_opt_wim(); // Parse default for 'listchars'. - (void)set_chars_option(curwin, &curwin->w_p_lcs); + (void)set_chars_option(curwin, &curwin->w_p_lcs, TRUE); // Parse default for 'fillchars'. - (void)set_chars_option(curwin, &curwin->w_p_fcs); + (void)set_chars_option(curwin, &curwin->w_p_fcs, TRUE); #ifdef FEAT_CLIPBOARD // Parse default for 'clipboard' @@ -5204,12 +5204,12 @@ unset_global_local_option(char_u *name, break; case PV_LCS: clear_string_option(&((win_T *)from)->w_p_lcs); - set_chars_option((win_T *)from, &((win_T *)from)->w_p_lcs); + set_chars_option((win_T *)from, &((win_T *)from)->w_p_lcs, TRUE); redraw_later(NOT_VALID); break; case PV_FCS: clear_string_option(&((win_T *)from)->w_p_fcs); - set_chars_option((win_T *)from, &((win_T *)from)->w_p_fcs); + set_chars_option((win_T *)from, &((win_T *)from)->w_p_fcs, TRUE); redraw_later(NOT_VALID); break; case PV_VE: @@ -5607,8 +5607,8 @@ after_copy_winopt(win_T *wp) fill_culopt_flags(NULL, wp); check_colorcolumn(wp); #endif - set_chars_option(wp, &wp->w_p_lcs); - set_chars_option(wp, &wp->w_p_fcs); + set_chars_option(wp, &wp->w_p_lcs, TRUE); + set_chars_option(wp, &wp->w_p_fcs, TRUE); } static char_u *