diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2021-10-17 16:37:29 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2021-11-06 14:24:46 +0100 |
commit | 2dc0af3a4ff16d311169ce2ecd120dd05778039c (patch) | |
tree | d261dc8ace960132956cf2bcaf9f2104a212511a /src/nvim/option.c | |
parent | b092171e7c632a2a6c8841056302ae281d993168 (diff) | |
download | rneovim-2dc0af3a4ff16d311169ce2ecd120dd05778039c.tar.gz rneovim-2dc0af3a4ff16d311169ce2ecd120dd05778039c.tar.bz2 rneovim-2dc0af3a4ff16d311169ce2ecd120dd05778039c.zip |
vim-patch:8.2.3528: 'thesaurus' and 'thesaurusfunc' do not have the same scope
Problem: 'thesaurus' and 'thesaurusfunc' do not have the same scope.
Solution: Make 'thesaurusfunc' global-local.
https://github.com/vim/vim/commit/f4d8b76d304dabc39c06d2344cd4c7b28484811b
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 527930f0ac..f471861473 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -139,7 +139,6 @@ static char_u *p_cpt; static char_u *p_cfu; static char_u *p_ofu; static char_u *p_tfu; -static char_u *p_thsfu; static int p_eol; static int p_fixeol; static int p_et; @@ -2036,6 +2035,7 @@ void check_buf_options(buf_T *buf) check_string_option(&buf->b_p_tc); check_string_option(&buf->b_p_dict); check_string_option(&buf->b_p_tsr); + check_string_option(&buf->b_p_tsrfu); check_string_option(&buf->b_p_lw); check_string_option(&buf->b_p_bkc); check_string_option(&buf->b_p_menc); @@ -5538,6 +5538,9 @@ void unset_global_local_option(char *name, void *from) case PV_TSR: clear_string_option(&buf->b_p_tsr); break; + case PV_TSRFU: + clear_string_option(&buf->b_p_tsrfu); + break; case PV_FP: clear_string_option(&buf->b_p_fp); break; @@ -5621,6 +5624,8 @@ static char_u *get_varp_scope(vimoption_T *p, int opt_flags) return (char_u *)&(curbuf->b_p_dict); case PV_TSR: return (char_u *)&(curbuf->b_p_tsr); + case PV_TSRFU: + return (char_u *)&(curbuf->b_p_tsrfu); case PV_TFU: return (char_u *)&(curbuf->b_p_tfu); case PV_SBR: @@ -5697,6 +5702,9 @@ static char_u *get_varp(vimoption_T *p) case PV_TSR: return *curbuf->b_p_tsr != NUL ? (char_u *)&(curbuf->b_p_tsr) : p->var; + case PV_TSRFU: + return *curbuf->b_p_tsrfu != NUL + ? (char_u *)&(curbuf->b_p_tsrfu) : p->var; case PV_FP: return *curbuf->b_p_fp != NUL ? (char_u *)&(curbuf->b_p_fp) : p->var; @@ -5916,8 +5924,6 @@ static char_u *get_varp(vimoption_T *p) return (char_u *)&(curbuf->b_p_sw); case PV_TFU: return (char_u *)&(curbuf->b_p_tfu); - case PV_TSRFU: - return (char_u *)&(curbuf->b_p_thsfu); case PV_TS: return (char_u *)&(curbuf->b_p_ts); case PV_TW: @@ -6187,7 +6193,6 @@ void buf_copy_options(buf_T *buf, int flags) #endif buf->b_p_cfu = vim_strsave(p_cfu); buf->b_p_ofu = vim_strsave(p_ofu); - buf->b_p_thsfu = vim_strsave(p_thsfu); buf->b_p_tfu = vim_strsave(p_tfu); buf->b_p_sts = p_sts; buf->b_p_sts_nopaste = p_sts_nopaste; @@ -6258,6 +6263,7 @@ void buf_copy_options(buf_T *buf, int flags) buf->b_p_inex = vim_strsave(p_inex); buf->b_p_dict = empty_option; buf->b_p_tsr = empty_option; + buf->b_p_tsrfu = empty_option; buf->b_p_qe = vim_strsave(p_qe); buf->b_p_udf = p_udf; buf->b_p_lw = empty_option; |