aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/insexpand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/insexpand.c')
-rw-r--r--src/nvim/insexpand.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c
index 84dd55fa78..4a73826233 100644
--- a/src/nvim/insexpand.c
+++ b/src/nvim/insexpand.c
@@ -164,7 +164,7 @@ struct compl_S {
int cp_flags; ///< CP_ values
int cp_number; ///< sequence number
int cp_score; ///< fuzzy match score
- int cp_user_hlattr; ///< highlight attribute to combine with
+ int cp_user_abbr_hlattr; ///< highlight attribute to combine with for abbr
int cp_user_kind_hlattr; ///< highlight attribute for kind
};
@@ -798,7 +798,7 @@ static inline void free_cptext(char *const *const cptext)
/// returned in case of error.
static int ins_compl_add(char *const str, int len, char *const fname, char *const *const cptext,
const bool cptext_allocated, typval_T *user_data, const Direction cdir,
- int flags_arg, const bool adup, int user_hlattr, int user_kind_hlattr)
+ int flags_arg, const bool adup, int user_abbr_hlattr, int user_kind_hlattr)
FUNC_ATTR_NONNULL_ARG(1)
{
compl_T *match;
@@ -864,7 +864,7 @@ static int ins_compl_add(char *const str, int len, char *const fname, char *cons
match->cp_fname = NULL;
}
match->cp_flags = flags;
- match->cp_user_hlattr = user_hlattr;
+ match->cp_user_abbr_hlattr = user_abbr_hlattr;
match->cp_user_kind_hlattr = user_kind_hlattr;
if (cptext != NULL) {
@@ -1268,7 +1268,7 @@ static int ins_compl_build_pum(void)
compl_match_array[i].pum_kind = comp->cp_text[CPT_KIND];
compl_match_array[i].pum_info = comp->cp_text[CPT_INFO];
compl_match_array[i].pum_score = comp->cp_score;
- compl_match_array[i].pum_user_hlattr = comp->cp_user_hlattr;
+ compl_match_array[i].pum_user_abbr_hlattr = comp->cp_user_abbr_hlattr;
compl_match_array[i].pum_user_kind_hlattr = comp->cp_user_kind_hlattr;
if (comp->cp_text[CPT_MENU] != NULL) {
compl_match_array[i++].pum_extra = comp->cp_text[CPT_MENU];
@@ -2567,9 +2567,9 @@ static int ins_compl_add_tv(typval_T *const tv, const Direction dir, bool fast)
bool empty = false;
int flags = fast ? CP_FAST : 0;
char *(cptext[CPT_COUNT]);
- char *user_hlname = NULL;
+ char *user_abbr_hlname = NULL;
+ int user_abbr_hlattr = -1;
char *user_kind_hlname = NULL;
- int user_hlattr = -1;
int user_kind_hlattr = -1;
typval_T user_data;
@@ -2581,8 +2581,8 @@ static int ins_compl_add_tv(typval_T *const tv, const Direction dir, bool fast)
cptext[CPT_KIND] = tv_dict_get_string(tv->vval.v_dict, "kind", true);
cptext[CPT_INFO] = tv_dict_get_string(tv->vval.v_dict, "info", true);
- user_hlname = tv_dict_get_string(tv->vval.v_dict, "hl_group", false);
- user_hlattr = get_user_highlight_attr(user_hlname);
+ user_abbr_hlname = tv_dict_get_string(tv->vval.v_dict, "abbr_hlgroup", false);
+ user_abbr_hlattr = get_user_highlight_attr(user_abbr_hlname);
user_kind_hlname = tv_dict_get_string(tv->vval.v_dict, "kind_hlgroup", false);
user_kind_hlattr = get_user_highlight_attr(user_kind_hlname);
@@ -2608,7 +2608,8 @@ static int ins_compl_add_tv(typval_T *const tv, const Direction dir, bool fast)
return FAIL;
}
int status = ins_compl_add((char *)word, -1, NULL, cptext, true,
- &user_data, dir, flags, dup, user_hlattr, user_kind_hlattr);
+ &user_data, dir, flags, dup,
+ user_abbr_hlattr, user_kind_hlattr);
if (status != OK) {
tv_clear(&user_data);
}