fix(eval): handle wrong v:lua in expr option properly (#29953)

This commit is contained in:
zeertzjq
2024-08-02 16:00:27 +08:00
committed by GitHub
parent 76dea5feaa
commit 2a3561819e
3 changed files with 41 additions and 1 deletions

View File

@@ -2630,7 +2630,7 @@ static int may_call_simple_func(const char *arg, typval_T *rettv)
if (parens != NULL && *skipwhite(parens + 2) == NUL) {
if (strnequal(arg, "v:lua.", 6)) {
const char *p = arg + 6;
if (skip_luafunc_name(p) == parens) {
if (p != parens && skip_luafunc_name(p) == parens) {
r = call_simple_luafunc(p, (size_t)(parens - p), rettv);
}
} else {