patch 8.2.4492: no error if an option is given a value with ":let &opt = val"
Problem: No error if an option is given an invalid value with
":let &opt = val".
Solution: Give the error. (closes #9864)
diff --git a/src/evalvars.c b/src/evalvars.c
index 862d519..eb69d3e 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -1518,8 +1518,11 @@
{
if (opt_type != gov_string || s != NULL)
{
- set_option_value(arg, n, s, scope);
+ char *err = set_option_value(arg, n, s, scope);
+
arg_end = p;
+ if (err != NULL)
+ emsg(_(err));
}
else
emsg(_(e_string_required));