1
0
forked from aniani/vim

patch 8.2.3725: cannot use a lambda for 'completefunc' and 'omnifunc'

Problem:    Cannot use a lambda for 'completefunc' and 'omnifunc'.
Solution:   Implement lambda support. (Yegappan Lakshmanan, closes #9257)
This commit is contained in:
Yegappan Lakshmanan
2021-12-03 11:09:29 +00:00
committed by Bram Moolenaar
parent 021ef351c2
commit 8658c759f0
14 changed files with 740 additions and 17 deletions

View File

@@ -2307,6 +2307,29 @@ ambw_end:
# endif
#endif
#ifdef FEAT_COMPL_FUNC
// 'completefunc'
else if (gvarp == &p_cfu)
{
if (set_completefunc_option() == FAIL)
errmsg = e_invarg;
}
// 'omnifunc'
else if (gvarp == &p_ofu)
{
if (set_omnifunc_option() == FAIL)
errmsg = e_invarg;
}
// 'thesaurusfunc'
else if (gvarp == &p_tsrfu)
{
if (set_thesaurusfunc_option() == FAIL)
errmsg = e_invarg;
}
#endif
// 'operatorfunc'
else if (varp == &p_opfunc)
{