summaryrefslogtreecommitdiffstats
path: root/src/evalvars.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-03-02 19:49:38 +0000
committerBram Moolenaar <Bram@vim.org>2022-03-02 19:49:38 +0000
commit8ccbbeb620dcc73154de29c51100fe815cefe109 (patch)
tree2da5c4d7ade1cbfafe3d14d73050ad387b1b379c /src/evalvars.c
parent7f687aaca9f2fd7c04f8a07effed92dd0164f6a2 (diff)
patch 8.2.4492: no error if an option is given a value with ":let &opt = val"v8.2.4492
Problem: No error if an option is given an invalid value with ":let &opt = val". Solution: Give the error. (closes #9864)
Diffstat (limited to 'src/evalvars.c')
-rw-r--r--src/evalvars.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/evalvars.c b/src/evalvars.c
index 862d5192bb..eb69d3e208 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -1518,8 +1518,11 @@ ex_let_option(
{
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));