diff options
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 1454af1a73..67fb78bcc8 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -4883,7 +4883,7 @@ int get_option_value_strict(char *name, if (p->flags & P_STRING) { *stringval = xstrdup(*(char **)(varp)); } else if (p->flags & P_NUM) { - *numval = *(long *) varp; + *numval = *(long *)varp; } else { *numval = *(int *)varp; } @@ -7705,7 +7705,7 @@ Dictionary get_vimoption(String name, Error *err) Dictionary get_all_vimoptions(void) { Dictionary retval = ARRAY_DICT_INIT; - for (size_t i = 0; i < PARAM_COUNT; i++) { + for (size_t i = 0; options[i].fullname != NULL; i++) { Dictionary opt_dict = vimoption2dict(&options[i]); PUT(retval, options[i].fullname, DICTIONARY_OBJ(opt_dict)); } |