@@ -100,13 +100,14 @@ struct compl_S
100100#ifdef FEAT_EVAL
101101 typval_T cp_user_data ;
102102#endif
103- char_u * cp_fname ; // file containing the match, allocated when
104- // cp_flags has CP_FREE_FNAME
105- int cp_flags ; // CP_ values
106- int cp_number ; // sequence number
107- int cp_score ; // fuzzy match score
108- int cp_user_hlattr ; // highlight attribute to combine with
109- int cp_user_kind_hlattr ; // highlight attribute for kind
103+ char_u * cp_fname ; // file containing the match, allocated when
104+ // cp_flags has CP_FREE_FNAME
105+ int cp_flags ; // CP_ values
106+ int cp_number ; // sequence number
107+ int cp_score ; // fuzzy match score
108+ int cp_user_abbr_hlattr ; // highlight attribute to combine with
109+ // for abbr.
110+ int cp_user_kind_hlattr ; // highlight attribute for kind
110111};
111112
112113// values for cp_flags
@@ -772,7 +773,7 @@ ins_compl_add(
772773 int cdir ,
773774 int flags_arg ,
774775 int adup , // accept duplicate match
775- int user_hlattr ,
776+ int user_abbr_hlattr ,
776777 int user_kind_hlattr )
777778{
778779 compl_T * match ;
@@ -837,7 +838,7 @@ ins_compl_add(
837838 else
838839 match -> cp_fname = NULL ;
839840 match -> cp_flags = flags ;
840- match -> cp_user_hlattr = user_hlattr ;
841+ match -> cp_user_abbr_hlattr = user_abbr_hlattr ;
841842 match -> cp_user_kind_hlattr = user_kind_hlattr ;
842843
843844 if (cptext != NULL )
@@ -1335,7 +1336,7 @@ ins_compl_build_pum(void)
13351336 compl_match_array [i ].pum_kind = compl -> cp_text [CPT_KIND ];
13361337 compl_match_array [i ].pum_info = compl -> cp_text [CPT_INFO ];
13371338 compl_match_array [i ].pum_score = compl -> cp_score ;
1338- compl_match_array [i ].pum_user_hlattr = compl -> cp_user_hlattr ;
1339+ compl_match_array [i ].pum_user_abbr_hlattr = compl -> cp_user_abbr_hlattr ;
13391340 compl_match_array [i ].pum_user_kind_hlattr = compl -> cp_user_kind_hlattr ;
13401341 if (compl -> cp_text [CPT_MENU ] != NULL )
13411342 compl_match_array [i ++ ].pum_extra =
@@ -2863,9 +2864,9 @@ ins_compl_add_tv(typval_T *tv, int dir, int fast)
28632864 char_u * (cptext [CPT_COUNT ]);
28642865 typval_T user_data ;
28652866 int status ;
2866- char_u * user_hlname ;
2867+ char_u * user_abbr_hlname ;
2868+ int user_abbr_hlattr = -1 ;
28672869 char_u * user_kind_hlname ;
2868- int user_hlattr = -1 ;
28692870 int user_kind_hlattr = -1 ;
28702871
28712872 user_data .v_type = VAR_UNKNOWN ;
@@ -2877,8 +2878,8 @@ ins_compl_add_tv(typval_T *tv, int dir, int fast)
28772878 cptext [CPT_KIND ] = dict_get_string (tv -> vval .v_dict , "kind" , FALSE);
28782879 cptext [CPT_INFO ] = dict_get_string (tv -> vval .v_dict , "info" , FALSE);
28792880
2880- user_hlname = dict_get_string (tv -> vval .v_dict , "hl_group " , FALSE);
2881- user_hlattr = get_user_highlight_attr (user_hlname );
2881+ user_abbr_hlname = dict_get_string (tv -> vval .v_dict , "abbr_hlgroup " , FALSE);
2882+ user_abbr_hlattr = get_user_highlight_attr (user_abbr_hlname );
28822883
28832884 user_kind_hlname = dict_get_string (tv -> vval .v_dict , "kind_hlgroup" , FALSE);
28842885 user_kind_hlattr = get_user_highlight_attr (user_kind_hlname );
@@ -2906,7 +2907,8 @@ ins_compl_add_tv(typval_T *tv, int dir, int fast)
29062907 return FAIL ;
29072908 }
29082909 status = ins_compl_add (word , -1 , NULL , cptext ,
2909- & user_data , dir , flags , dup , user_hlattr , user_kind_hlattr );
2910+ & user_data , dir , flags , dup ,
2911+ user_abbr_hlattr , user_kind_hlattr );
29102912 if (status != OK )
29112913 clear_tv (& user_data );
29122914 return status ;
0 commit comments