aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/optionstr.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-10-15 17:52:08 +0800
committerGitHub <noreply@github.com>2023-10-15 17:52:08 +0800
commit75b488d3ef2e9dafba43c72487839aa78950d453 (patch)
treec538db61c1e2e17112f09e9432bdcb0a035dd9f6 /src/nvim/optionstr.c
parentd974a3dcbb3757ebeb78fa64054c795ab7acdf1a (diff)
downloadrneovim-75b488d3ef2e9dafba43c72487839aa78950d453.tar.gz
rneovim-75b488d3ef2e9dafba43c72487839aa78950d453.tar.bz2
rneovim-75b488d3ef2e9dafba43c72487839aa78950d453.zip
vim-patch:9.0.2025: no cmdline completion for ++opt args (#25657)
Problem: no cmdline completion for ++opt args Solution: Add cmdline completion for :e ++opt=arg and :terminal [++options] closes: vim/vim#13319 https://github.com/vim/vim/commit/989426be6e9ae23d2413943890206cbe15d9df38 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r--src/nvim/optionstr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c
index 6f41bba99b..88e7ebd991 100644
--- a/src/nvim/optionstr.c
+++ b/src/nvim/optionstr.c
@@ -1490,6 +1490,17 @@ int expand_set_fileformat(optexpand_T *args, int *numMatches, char ***matches)
matches);
}
+/// Function given to ExpandGeneric() to obtain the possible arguments of the
+/// fileformat options.
+char *get_fileformat_name(expand_T *xp FUNC_ATTR_UNUSED, int idx)
+{
+ if (idx >= (int)ARRAY_SIZE(p_ff_values)) {
+ return NULL;
+ }
+
+ return p_ff_values[idx];
+}
+
/// The 'fileformats' option is changed.
const char *did_set_fileformats(optset_T *args)
{