diff options
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 940570b134..2a2d2cce80 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1963,13 +1963,10 @@ static char_u *option_expand(int opt_idx, char_u *val) return NameBuff; } -// After setting various option values: recompute variables that depend on -// option values. -static void didset_options(void) +/// After setting various option values: recompute variables that depend on +/// option values. +static void didset_string_options(void) { - // initialize the table for 'iskeyword' et.al. - (void)init_chartab(); - (void)opt_strings_flags(p_cmp, p_cmp_values, &cmp_flags, true); (void)opt_strings_flags(p_bkc, p_bkc_values, &bkc_flags, true); (void)opt_strings_flags(p_bo, p_bo_values, &bo_flags, true); @@ -1981,8 +1978,20 @@ static void didset_options(void) (void)opt_strings_flags(p_tc, p_tc_values, &tc_flags, false); (void)opt_strings_flags(p_tpf, p_tpf_values, &tpf_flags, true); (void)opt_strings_flags(p_ve, p_ve_values, &ve_flags, true); + (void)opt_strings_flags(p_swb, p_swb_values, &swb_flags, true); (void)opt_strings_flags(p_wop, p_wop_values, &wop_flags, true); (void)opt_strings_flags(p_jop, p_jop_values, &jop_flags, true); +} + +/// After setting various option values: recompute variables that depend on +/// option values. +static void didset_options(void) +{ + // initialize the table for 'iskeyword' et.al. + (void)init_chartab(); + + didset_string_options(); + (void)spell_check_msm(); (void)spell_check_sps(); (void)compile_cap_prog(curwin->w_s); @@ -8161,13 +8170,13 @@ size_t copy_option_part(char_u **option, char_u *buf, size_t maxlen, char *sep_c /// Return true when 'shell' has "csh" in the tail. int csh_like_shell(void) { - return strstr((char *)path_tail(p_sh), "csh") != NULL; + return strstr(path_tail((char *)p_sh), "csh") != NULL; } /// Return true when 'shell' has "fish" in the tail. bool fish_like_shell(void) { - return strstr((char *)path_tail(p_sh), "fish") != NULL; + return strstr(path_tail((char *)p_sh), "fish") != NULL; } /// Return the number of requested sign columns, based on current |