mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
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)
This commit is contained in:
committed by
Bram Moolenaar
parent
40bcec1bac
commit
6409553b6e
@@ -875,7 +875,7 @@ vim_str2rb_enc_str(const char *s)
|
||||
char_u *sval;
|
||||
rb_encoding *enc;
|
||||
|
||||
if (get_option_value((char_u *)"enc", &lval, &sval, 0) == gov_string)
|
||||
if (get_option_value((char_u *)"enc", &lval, &sval, NULL, 0) == gov_string)
|
||||
{
|
||||
enc = rb_enc_find((char *)sval);
|
||||
vim_free(sval);
|
||||
@@ -895,7 +895,7 @@ eval_enc_string_protect(const char *str, int *state)
|
||||
rb_encoding *enc;
|
||||
VALUE v;
|
||||
|
||||
if (get_option_value((char_u *)"enc", &lval, &sval, 0) == gov_string)
|
||||
if (get_option_value((char_u *)"enc", &lval, &sval, NULL, 0) == gov_string)
|
||||
{
|
||||
enc = rb_enc_find((char *)sval);
|
||||
vim_free(sval);
|
||||
|
Reference in New Issue
Block a user