Skip to content

Commit

Permalink
vim-patch:8.2.3525: option variable name does not match option name
Browse files Browse the repository at this point in the history
Problem:    Option variable name does not match option name. (Christ van
            Willigen)
Solution:   Rename the variable.
vim/vim@d4c4bfa
  • Loading branch information
mcepl authored and Shougo committed Nov 15, 2021
1 parent f878b49 commit 3678f04
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/nvim/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1925,7 +1925,7 @@ void free_buf_options(buf_T *buf, int free_p_ff)
clear_string_option(&buf->b_p_cpt);
clear_string_option(&buf->b_p_cfu);
clear_string_option(&buf->b_p_ofu);
clear_string_option(&buf->b_p_thsfu);
clear_string_option(&buf->b_p_tsrfu);
clear_string_option(&buf->b_p_gp);
clear_string_option(&buf->b_p_mp);
clear_string_option(&buf->b_p_efm);
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/buffer_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ struct file_buffer {
#endif
char_u *b_p_cfu; ///< 'completefunc'
char_u *b_p_ofu; ///< 'omnifunc'
char_u *b_p_thsfu; ///< 'thesaurusfunc'
char_u *b_p_tsrfu; ///< 'thesaurusfunc'
char_u *b_p_tfu; ///< 'tagfunc'
int b_p_eol; ///< 'endofline'
int b_p_fixeol; ///< 'fixendofline'
Expand Down
8 changes: 4 additions & 4 deletions src/nvim/edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -2071,7 +2071,7 @@ static bool check_compl_option(bool dict_opt)
{
if (dict_opt
? (*curbuf->b_p_dict == NUL && *p_dict == NUL && !curwin->w_p_spell)
: (*curbuf->b_p_tsr == NUL && *p_tsr == NUL && *curbuf->b_p_thsfu == NUL)) {
: (*curbuf->b_p_tsr == NUL && *p_tsr == NUL && *curbuf->b_p_tsrfu == NUL)) {
ctrl_x_mode = CTRL_X_NORMAL;
edit_submode = NULL;
msg_attr((dict_opt
Expand Down Expand Up @@ -3930,7 +3930,7 @@ static char_u *get_complete_funcname(int type) {
case CTRL_X_OMNI:
return curbuf->b_p_ofu;
case CTRL_X_THESAURUS:
return curbuf->b_p_thsfu;
return curbuf->b_p_tsrfu;
default:
return (char_u *)"";
}
Expand Down Expand Up @@ -4115,8 +4115,8 @@ int ins_compl_add_tv(typval_T *const tv, const Direction dir, bool fast)
static int thesaurus_func_complete(int type)
{
return (type == CTRL_X_THESAURUS
&& curbuf->b_p_thsfu != NULL
&& *curbuf->b_p_thsfu != NUL);
&& curbuf->b_p_tsrfu != NULL
&& *curbuf->b_p_tsrfu != NUL);
}

// Get the next expansion(s), using "compl_pattern".
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/option.c
Original file line number Diff line number Diff line change
Expand Up @@ -5915,7 +5915,7 @@ 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_THSFU:
case PV_TSRFU:
return (char_u *)&(curbuf->b_p_thsfu);
case PV_TS:
return (char_u *)&(curbuf->b_p_ts);
Expand Down

0 comments on commit 3678f04

Please sign in to comment.