Mercurial > vim
diff src/vim9compile.c @ 26441:65ab0b035dd8 v8.2.3751
patch 8.2.3751: cannot assign a lambda to an option that takes a function
Commit: https://github.com/vim/vim/commit/6409553b6e3b4de4e1d72b8ee5445595214581ff
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Mon Dec 6 11:03:55 2021 +0000
patch 8.2.3751: cannot assign a lambda to an option that takes a function
Problem: Cannot assign a lambda to an option that takes a function.
Solution: Automatically convert the lambda to a string. (Yegappan
Lakshmanan, closes #9286)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 06 Dec 2021 12:15:04 +0100 |
parents | 1bbb884c8561 |
children | ff0310e6f889 |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -6072,7 +6072,7 @@ vim9_declare_error(char_u *name) /* * For one assignment figure out the type of destination. Return it in "dest". * When not recognized "dest" is not set. - * For an option "opt_flags" is set. + * For an option "option_scope" is set. * For a v:var "vimvaridx" is set. * "type" is set to the destination type if known, unchanted otherwise. * Return FAIL if an error message was given. @@ -6082,7 +6082,7 @@ get_var_dest( char_u *name, assign_dest_T *dest, int cmdidx, - int *opt_flags, + int *option_scope, int *vimvaridx, type_T **type, cctx_T *cctx) @@ -6102,7 +6102,7 @@ get_var_dest( return FAIL; } p = name; - p = find_option_end(&p, opt_flags); + p = find_option_end(&p, option_scope); if (p == NULL) { // cannot happen? @@ -6112,7 +6112,7 @@ get_var_dest( cc = *p; *p = NUL; opt_type = get_option_value(skip_option_env_lead(name), - &numval, NULL, *opt_flags); + &numval, NULL, NULL, *option_scope); *p = cc; switch (opt_type) {