diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-10-01 21:05:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-01 21:05:12 +0800 |
commit | b40c70f2fcaf709d2bf8b3209ae1e2f617d8e852 (patch) | |
tree | 489e52a8c585f8f1fccfdddf814ac763ad2b7522 /src/nvim/mbyte.c | |
parent | 9b3045103f7d56e5ccd0574dcb93e953b72d5f50 (diff) | |
parent | 01c51a491330bd10202c73aff92c0978984c0692 (diff) | |
download | rneovim-b40c70f2fcaf709d2bf8b3209ae1e2f617d8e852.tar.gz rneovim-b40c70f2fcaf709d2bf8b3209ae1e2f617d8e852.tar.bz2 rneovim-b40c70f2fcaf709d2bf8b3209ae1e2f617d8e852.zip |
Merge pull request #25456 from zeertzjq/vim-9.0.1958
vim-patch:9.0.{1958,1960,1961,1968}: string option completion
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r-- | src/nvim/mbyte.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 7b7c822b3b..124855fd08 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -2830,3 +2830,14 @@ void f_charclass(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) } rettv->vval.v_number = mb_get_class(argvars[0].vval.v_string); } + +/// Function given to ExpandGeneric() to obtain the possible arguments of the +/// encoding options. +char *get_encoding_name(expand_T *xp FUNC_ATTR_UNUSED, int idx) +{ + if (idx >= (int)ARRAY_SIZE(enc_canon_table)) { + return NULL; + } + + return (char *)enc_canon_table[idx].name; +} |