mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
fix(eval): properly support checking v:lua function in exists() (#27124)
This commit is contained in:
@@ -1726,7 +1726,7 @@ static void f_exists(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
n = false; // Trailing garbage.
|
||||
}
|
||||
} else if (*p == '*') { // Internal or user defined function.
|
||||
n = function_exists(p + 1, false);
|
||||
n = strncmp(p, "*v:lua.", 7) == 0 ? nlua_func_exists(p + 7) : function_exists(p + 1, false);
|
||||
} else if (*p == ':') {
|
||||
n = cmd_exists(p + 1);
|
||||
} else if (*p == '#') {
|
||||
@@ -1735,8 +1735,6 @@ static void f_exists(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
} else {
|
||||
n = au_exists(p + 1);
|
||||
}
|
||||
} else if (strncmp(p, "v:lua.", 6) == 0 && nlua_func_exists(p + 6)) {
|
||||
n = true;
|
||||
} else { // Internal variable.
|
||||
n = var_exists(p);
|
||||
}
|
||||
|
Reference in New Issue
Block a user