Mercurial > vim
comparison src/optiondefs.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 |
comparison
equal
deleted
inserted
replaced
26440:f6f5f604c17c | 26441:65ab0b035dd8 |
---|---|
682 #else | 682 #else |
683 (char_u *)NULL, PV_NONE, | 683 (char_u *)NULL, PV_NONE, |
684 #endif | 684 #endif |
685 {(char_u *)0L, (char_u *)0L} | 685 {(char_u *)0L, (char_u *)0L} |
686 SCTX_INIT}, | 686 SCTX_INIT}, |
687 {"completefunc", "cfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE, | 687 {"completefunc", "cfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE|P_FUNC, |
688 #ifdef FEAT_COMPL_FUNC | 688 #ifdef FEAT_COMPL_FUNC |
689 (char_u *)&p_cfu, PV_CFU, | 689 (char_u *)&p_cfu, PV_CFU, |
690 {(char_u *)"", (char_u *)0L} | 690 {(char_u *)"", (char_u *)0L} |
691 #else | 691 #else |
692 (char_u *)NULL, PV_NONE, | 692 (char_u *)NULL, PV_NONE, |
1319 (char_u *)&p_iconstring, PV_NONE, | 1319 (char_u *)&p_iconstring, PV_NONE, |
1320 {(char_u *)"", (char_u *)0L} SCTX_INIT}, | 1320 {(char_u *)"", (char_u *)0L} SCTX_INIT}, |
1321 {"ignorecase", "ic", P_BOOL|P_VI_DEF, | 1321 {"ignorecase", "ic", P_BOOL|P_VI_DEF, |
1322 (char_u *)&p_ic, PV_NONE, | 1322 (char_u *)&p_ic, PV_NONE, |
1323 {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, | 1323 {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, |
1324 {"imactivatefunc","imaf",P_STRING|P_VI_DEF|P_SECURE, | 1324 {"imactivatefunc","imaf",P_STRING|P_VI_DEF|P_SECURE|P_FUNC, |
1325 #if defined(FEAT_EVAL) | 1325 #if defined(FEAT_EVAL) |
1326 (char_u *)&p_imaf, PV_NONE, | 1326 (char_u *)&p_imaf, PV_NONE, |
1327 {(char_u *)"", (char_u *)NULL} | 1327 {(char_u *)"", (char_u *)NULL} |
1328 # else | 1328 # else |
1329 (char_u *)NULL, PV_NONE, | 1329 (char_u *)NULL, PV_NONE, |
1354 SCTX_INIT}, | 1354 SCTX_INIT}, |
1355 {"imsearch", "ims", P_NUM|P_VI_DEF, | 1355 {"imsearch", "ims", P_NUM|P_VI_DEF, |
1356 (char_u *)&p_imsearch, PV_IMS, | 1356 (char_u *)&p_imsearch, PV_IMS, |
1357 {(char_u *)B_IMODE_USE_INSERT, (char_u *)0L} | 1357 {(char_u *)B_IMODE_USE_INSERT, (char_u *)0L} |
1358 SCTX_INIT}, | 1358 SCTX_INIT}, |
1359 {"imstatusfunc","imsf",P_STRING|P_VI_DEF|P_SECURE, | 1359 {"imstatusfunc","imsf",P_STRING|P_VI_DEF|P_SECURE|P_FUNC, |
1360 #if defined(FEAT_EVAL) | 1360 #if defined(FEAT_EVAL) |
1361 (char_u *)&p_imsf, PV_NONE, | 1361 (char_u *)&p_imsf, PV_NONE, |
1362 {(char_u *)"", (char_u *)NULL} | 1362 {(char_u *)"", (char_u *)NULL} |
1363 #else | 1363 #else |
1364 (char_u *)NULL, PV_NONE, | 1364 (char_u *)NULL, PV_NONE, |
1820 (char_u *)VAR_WIN, PV_NUW, | 1820 (char_u *)VAR_WIN, PV_NUW, |
1821 #else | 1821 #else |
1822 (char_u *)NULL, PV_NONE, | 1822 (char_u *)NULL, PV_NONE, |
1823 #endif | 1823 #endif |
1824 {(char_u *)8L, (char_u *)4L} SCTX_INIT}, | 1824 {(char_u *)8L, (char_u *)4L} SCTX_INIT}, |
1825 {"omnifunc", "ofu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE, | 1825 {"omnifunc", "ofu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE|P_FUNC, |
1826 #ifdef FEAT_COMPL_FUNC | 1826 #ifdef FEAT_COMPL_FUNC |
1827 (char_u *)&p_ofu, PV_OFU, | 1827 (char_u *)&p_ofu, PV_OFU, |
1828 {(char_u *)"", (char_u *)0L} | 1828 {(char_u *)"", (char_u *)0L} |
1829 #else | 1829 #else |
1830 (char_u *)NULL, PV_NONE, | 1830 (char_u *)NULL, PV_NONE, |
1840 #else | 1840 #else |
1841 (char_u *)NULL, PV_NONE, | 1841 (char_u *)NULL, PV_NONE, |
1842 #endif | 1842 #endif |
1843 {(char_u *)FALSE, (char_u *)FALSE} | 1843 {(char_u *)FALSE, (char_u *)FALSE} |
1844 SCTX_INIT}, | 1844 SCTX_INIT}, |
1845 {"operatorfunc", "opfunc", P_STRING|P_VI_DEF|P_SECURE, | 1845 {"operatorfunc", "opfunc", P_STRING|P_VI_DEF|P_SECURE|P_FUNC, |
1846 (char_u *)&p_opfunc, PV_NONE, | 1846 (char_u *)&p_opfunc, PV_NONE, |
1847 {(char_u *)"", (char_u *)0L} SCTX_INIT}, | 1847 {(char_u *)"", (char_u *)0L} SCTX_INIT}, |
1848 {"optimize", "opt", P_BOOL|P_VI_DEF, | 1848 {"optimize", "opt", P_BOOL|P_VI_DEF, |
1849 (char_u *)NULL, PV_NONE, | 1849 (char_u *)NULL, PV_NONE, |
1850 {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, | 1850 {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, |
2053 #else | 2053 #else |
2054 (char_u *)NULL, PV_NONE, | 2054 (char_u *)NULL, PV_NONE, |
2055 #endif | 2055 #endif |
2056 {(char_u *)DEFAULT_PYTHON_VER, (char_u *)0L} | 2056 {(char_u *)DEFAULT_PYTHON_VER, (char_u *)0L} |
2057 SCTX_INIT}, | 2057 SCTX_INIT}, |
2058 {"quickfixtextfunc", "qftf", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM|P_SECURE, | 2058 {"quickfixtextfunc", "qftf", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM|P_SECURE|P_FUNC, |
2059 #if defined(FEAT_QUICKFIX) && defined(FEAT_EVAL) | 2059 #if defined(FEAT_QUICKFIX) && defined(FEAT_EVAL) |
2060 (char_u *)&p_qftf, PV_NONE, | 2060 (char_u *)&p_qftf, PV_NONE, |
2061 {(char_u *)"", (char_u *)0L} | 2061 {(char_u *)"", (char_u *)0L} |
2062 #else | 2062 #else |
2063 (char_u *)NULL, PV_NONE, | 2063 (char_u *)NULL, PV_NONE, |
2505 #endif | 2505 #endif |
2506 SCTX_INIT}, | 2506 SCTX_INIT}, |
2507 {"tagcase", "tc", P_STRING|P_VIM, | 2507 {"tagcase", "tc", P_STRING|P_VIM, |
2508 (char_u *)&p_tc, PV_TC, | 2508 (char_u *)&p_tc, PV_TC, |
2509 {(char_u *)"followic", (char_u *)"followic"} SCTX_INIT}, | 2509 {(char_u *)"followic", (char_u *)"followic"} SCTX_INIT}, |
2510 {"tagfunc", "tfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE, | 2510 {"tagfunc", "tfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE|P_FUNC, |
2511 #ifdef FEAT_EVAL | 2511 #ifdef FEAT_EVAL |
2512 (char_u *)&p_tfu, PV_TFU, | 2512 (char_u *)&p_tfu, PV_TFU, |
2513 {(char_u *)"", (char_u *)0L} | 2513 {(char_u *)"", (char_u *)0L} |
2514 #else | 2514 #else |
2515 (char_u *)NULL, PV_NONE, | 2515 (char_u *)NULL, PV_NONE, |
2622 (char_u *)&p_tw, PV_TW, | 2622 (char_u *)&p_tw, PV_TW, |
2623 {(char_u *)0L, (char_u *)0L} SCTX_INIT}, | 2623 {(char_u *)0L, (char_u *)0L} SCTX_INIT}, |
2624 {"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME, | 2624 {"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME, |
2625 (char_u *)&p_tsr, PV_TSR, | 2625 (char_u *)&p_tsr, PV_TSR, |
2626 {(char_u *)"", (char_u *)0L} SCTX_INIT}, | 2626 {(char_u *)"", (char_u *)0L} SCTX_INIT}, |
2627 {"thesaurusfunc", "tsrfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE, | 2627 {"thesaurusfunc", "tsrfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE|P_FUNC, |
2628 #ifdef FEAT_COMPL_FUNC | 2628 #ifdef FEAT_COMPL_FUNC |
2629 (char_u *)&p_tsrfu, PV_TSRFU, | 2629 (char_u *)&p_tsrfu, PV_TSRFU, |
2630 {(char_u *)"", (char_u *)0L} | 2630 {(char_u *)"", (char_u *)0L} |
2631 #else | 2631 #else |
2632 (char_u *)NULL, PV_NONE, | 2632 (char_u *)NULL, PV_NONE, |