diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-12-06 11:03:55 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-06 11:03:55 +0000 |
commit | 6409553b6e3b4de4e1d72b8ee5445595214581ff (patch) | |
tree | 1b24d5f956763a1bc7a5b47fc9875598d0d438d6 /src/eval.c | |
parent | 40bcec1bac34d34a3d4d7c5f6b2cc1f163acbd00 (diff) |
patch 8.2.3751: cannot assign a lambda to an option that takes a functionv8.2.3751
Problem: Cannot assign a lambda to an option that takes a function.
Solution: Automatically convert the lambda to a string. (Yegappan
Lakshmanan, closes #9286)
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c index bebe2f0ad5..bc4db2906c 100644 --- a/src/eval.c +++ b/src/eval.c @@ -6281,23 +6281,23 @@ ex_execute(exarg_T *eap) * after the option name. */ char_u * -find_option_end(char_u **arg, int *opt_flags) +find_option_end(char_u **arg, int *scope) { char_u *p = *arg; ++p; if (*p == 'g' && p[1] == ':') { - *opt_flags = OPT_GLOBAL; + *scope = OPT_GLOBAL; p += 2; } else if (*p == 'l' && p[1] == ':') { - *opt_flags = OPT_LOCAL; + *scope = OPT_LOCAL; p += 2; } else - *opt_flags = 0; + *scope = 0; if (!ASCII_ISALPHA(*p)) return NULL; |