patch 7.4.2121
Problem: No easy way to check if lambda and closure are supported.
Solution: Add the +lambda feature.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 53783af..f665842 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -5205,6 +5205,7 @@
#ifdef FEAT_KEYMAP
"keymap",
#endif
+ "lambda", /* always with FEAT_EVAL, since 7.4.2120 with closure */
#ifdef FEAT_LANGMAP
"langmap",
#endif
diff --git a/src/testdir/test_lambda.vim b/src/testdir/test_lambda.vim
index 9eb34e4..5118738 100644
--- a/src/testdir/test_lambda.vim
+++ b/src/testdir/test_lambda.vim
@@ -1,5 +1,9 @@
" Test for lambda and closure
+function! Test_lambda_feature()
+ call assert_equal(1, has('lambda'))
+endfunction
+
function! Test_lambda_with_filter()
let s:x = 2
call assert_equal([2, 3], filter([1, 2, 3], {i, v -> v >= s:x}))
diff --git a/src/version.c b/src/version.c
index 7e8ca16..4af1468 100644
--- a/src/version.c
+++ b/src/version.c
@@ -304,6 +304,11 @@
#else
"-keymap",
#endif
+#ifdef FEAT_EVAL
+ "+lambda",
+#else
+ "-lambda",
+#endif
#ifdef FEAT_LANGMAP
"+langmap",
#else
@@ -759,6 +764,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2121,
+/**/
2120,
/**/
2119,