0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.3712: cannot use Vim9 lambda for 'tagfunc'

Problem:    Cannot use Vim9 lambda for 'tagfunc'.
Solution:   Make it work, add more tests. (Yegappan Lakshmanan, closes #9250)
This commit is contained in:
Yegappan Lakshmanan
2021-12-01 10:30:07 +00:00
committed by Bram Moolenaar
parent 56a8ffdb6e
commit 05e59e3a9f
5 changed files with 114 additions and 18 deletions

View File

@@ -7187,7 +7187,7 @@ option_set_callback_func(char_u *optval UNUSED, callback_T *optcb UNUSED)
return OK;
}
if (*optval == '{'
if (*optval == '{' || (in_vim9script() && *optval == '(')
|| (STRNCMP(optval, "function(", 9) == 0)
|| (STRNCMP(optval, "funcref(", 8) == 0))
// Lambda expression or a funcref