From 42e44d6d334bda8b97afe9e34a819ab293e5e10a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 7 Nov 2022 10:26:54 +0800 Subject: vim-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 vim/vim#9286) https://github.com/vim/vim/commit/6409553b6e3b4de4e1d72b8ee5445595214581ff Co-authored-by: Yegappan Lakshmanan --- src/nvim/api/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/api') diff --git a/src/nvim/api/options.c b/src/nvim/api/options.c index ec1f19cf6a..92f20fff48 100644 --- a/src/nvim/api/options.c +++ b/src/nvim/api/options.c @@ -487,7 +487,7 @@ static getoption_T access_option_value(char *key, long *numval, char **stringval bool get, Error *err) { if (get) { - return get_option_value(key, numval, stringval, opt_flags); + return get_option_value(key, numval, stringval, NULL, opt_flags); } else { char *errmsg; if ((errmsg = set_option_value(key, *numval, *stringval, opt_flags))) { -- cgit