forked from aniani/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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user