diff src/option.h @ 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 a2e6da79274d
children 8088fa133b93
line wrap: on
line diff
--- a/src/option.h
+++ b/src/option.h
@@ -59,6 +59,7 @@
 #define P_NDNAME      0x8000000L // only normal dir name chars allowed
 #define P_RWINONLY   0x10000000L // only redraw current window
 #define P_MLE	     0x20000000L // under control of 'modelineexpr'
+#define P_FUNC	     0x40000000L // accept a function reference or a lambda
 
 // Returned by get_option_value().
 typedef enum {