0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.3619: cannot use a lambda for 'operatorfunc'

Problem:    Cannot use a lambda for 'operatorfunc'.
Solution:   Support using a lambda or partial. (Yegappan Lakshmanan,
            closes #8775)
This commit is contained in:
Yegappan Lakshmanan
2021-11-18 22:08:57 +00:00
committed by Bram Moolenaar
parent 851c7a699a
commit 777175b0df
10 changed files with 185 additions and 41 deletions

View File

@@ -2320,10 +2320,18 @@ ambw_end:
# endif
#endif
// 'operatorfunc'
else if (varp == &p_opfunc)
{
if (set_operatorfunc_option() == FAIL)
errmsg = e_invarg;
}
#ifdef FEAT_QUICKFIX
// 'quickfixtextfunc'
else if (varp == &p_qftf)
{
if (qf_process_qftf_option() == FALSE)
if (qf_process_qftf_option() == FAIL)
errmsg = e_invarg;
}
#endif