diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-10-17 14:13:09 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-10-17 14:13:09 +0100 |
commit | f4d8b76d304dabc39c06d2344cd4c7b28484811b (patch) | |
tree | 56f98aadab44534d6529e802c00bbff8adbf0969 /src/insexpand.c | |
parent | 9d4b8caf9eddb2db09395587c621309f4513befa (diff) |
patch 8.2.3528: 'thesaurus' and 'thesaurusfunc' do not have the same scopev8.2.3528
Problem: 'thesaurus' and 'thesaurusfunc' do not have the same scope.
Solution: Make 'thesaurusfunc' global-local.
Diffstat (limited to 'src/insexpand.c')
-rw-r--r-- | src/insexpand.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/insexpand.c b/src/insexpand.c index bcaa3fdf54..6d5e556c66 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -301,7 +301,7 @@ has_compl_option(int dict_opt) ) : (*curbuf->b_p_tsr == NUL && *p_tsr == NUL #ifdef FEAT_COMPL_FUNC - && *curbuf->b_p_tsrfu == NUL + && *curbuf->b_p_tsrfu == NUL && *p_tsrfu == NUL #endif )) { @@ -2246,7 +2246,7 @@ get_complete_funcname(int type) case CTRL_X_OMNI: return curbuf->b_p_ofu; case CTRL_X_THESAURUS: - return curbuf->b_p_tsrfu; + return *curbuf->b_p_tsrfu == NUL ? p_tsrfu : curbuf->b_p_tsrfu; default: return (char_u *)""; } @@ -2750,9 +2750,8 @@ f_complete_info(typval_T *argvars, typval_T *rettv) thesaurus_func_complete(int type UNUSED) { #ifdef FEAT_COMPL_FUNC - return (type == CTRL_X_THESAURUS - && curbuf->b_p_tsrfu != NULL - && *curbuf->b_p_tsrfu != NUL); + return type == CTRL_X_THESAURUS + && (*curbuf->b_p_tsrfu != NUL || *p_tsrfu != NUL); #else return FALSE; #endif |