0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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)
This commit is contained in:
Bram Moolenaar
2022-03-02 19:49:38 +00:00
parent 7f687aaca9
commit 8ccbbeb620
3 changed files with 8 additions and 1 deletions

View File

@@ -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));