diff options
author | Famiu Haque <famiuhaque@proton.me> | 2023-06-07 08:51:24 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-07 10:51:24 +0800 |
commit | a217675a67233ca2032cd668e919858d2aed92e7 (patch) | |
tree | 4183ef18bcb703f4d5716e6ddb0ecb69939db2e3 | |
parent | fcaf0d5f3824431520a0b6353c771107cc63ed4e (diff) | |
download | rneovim-a217675a67233ca2032cd668e919858d2aed92e7.tar.gz rneovim-a217675a67233ca2032cd668e919858d2aed92e7.tar.bz2 rneovim-a217675a67233ca2032cd668e919858d2aed92e7.zip |
refactor(options): use slash separator for `option_get_valid_types()` (#23945)
`option_get_valid_types()` currently uses a comma separator for
multi-type options which does not fit well with the changed error
message for invalid option value type. A slash seperator is much more
suited for its current use-case.
-rw-r--r-- | src/nvim/option.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 518d81be49..073a1684fb 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3428,8 +3428,8 @@ static char *optval_to_cstr(OptVal o) // Get an allocated string containing a list of valid types for an option. // For options with a singular type, it returns the name of the type. For options with multiple -// possible types, it returns a comma separated list of types. For example, if an option can be a -// number, boolean or string, the function returns "Number, Boolean, String" +// possible types, it returns a slash separated list of types. For example, if an option can be a +// number, boolean or string, the function returns "Number/Boolean/String" static char *option_get_valid_types(int opt_idx) { uint32_t flags = options[opt_idx].flags; @@ -3443,7 +3443,7 @@ static char *option_get_valid_types(int opt_idx) if (type_count == 0) { \ kv_concat(str, typename); \ } else { \ - kv_printf(str, ", %s", typename); \ + kv_printf(str, "/%s", typename); \ } \ type_count++; \ } while (0); |