aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 6f28f37d2b..67fb78bcc8 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -3641,9 +3641,11 @@ char_u *check_stl_option(char_u *s)
return illegal_char(errbuf, sizeof(errbuf), *s);
}
if (*s == '{') {
+ int reevaluate = (*s == '%');
s++;
- while (*s != '}' && *s)
+ while ((*s != '}' || (reevaluate && s[-1] != '%')) && *s) {
s++;
+ }
if (*s != '}') {
return (char_u *)N_("E540: Unclosed expression sequence");
}
@@ -4881,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;
}
@@ -5230,6 +5232,11 @@ int makeset(FILE *fd, int opt_flags, int local_only)
continue;
}
+ if ((opt_flags & OPT_SKIPRTP)
+ && (p->var == (char_u *)&p_rtp || p->var == (char_u *)&p_pp)) {
+ continue;
+ }
+
round = 2;
if (p->indir != PV_NONE) {
if (p->var == VAR_WIN) {
@@ -7698,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));
}