diff options
Diffstat (limited to 'src/mbyte.c')
-rw-r--r-- | src/mbyte.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index c4d1ddb3b8..4951f78323 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -5782,3 +5782,16 @@ f_charclass(typval_T *argvars, typval_T *rettv UNUSED) rettv->vval.v_number = mb_get_class(argvars[0].vval.v_string); } #endif + +/* + * Function given to ExpandGeneric() to obtain the possible arguments of the + * encoding options. + */ + char_u * +get_encoding_name(expand_T *xp UNUSED, int idx) +{ + if (idx >= (int)(sizeof(enc_canon_table) / sizeof(enc_canon_table[0]))) + return NULL; + + return (char_u*)enc_canon_table[idx].name; +} |