diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-03-02 19:49:38 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-03-02 19:49:38 +0000 |
commit | 8ccbbeb620dcc73154de29c51100fe815cefe109 (patch) | |
tree | 2da5c4d7ade1cbfafe3d14d73050ad387b1b379c /src/evalvars.c | |
parent | 7f687aaca9f2fd7c04f8a07effed92dd0164f6a2 (diff) | |
download | vim-git-8ccbbeb620dcc73154de29c51100fe815cefe109.tar.gz |
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.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/evalvars.c b/src/evalvars.c index 862d5192b..eb69d3e20 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)); |