mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 9.0.1185: using class from imported script not tested
Problem: Using class from imported script not tested. Solution: Add tests. Implement what is missing.
This commit is contained in:
@@ -3104,6 +3104,31 @@ eval_variable(
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the value of internal variable "name", also handling "import.name".
|
||||
* Return OK or FAIL. If OK is returned "rettv" must be cleared.
|
||||
*/
|
||||
int
|
||||
eval_variable_import(
|
||||
char_u *name,
|
||||
typval_T *rettv)
|
||||
{
|
||||
char_u *s = name;
|
||||
while (ASCII_ISALNUM(*s) || *s == '_')
|
||||
++s;
|
||||
int len = (int)(s - name);
|
||||
|
||||
if (eval_variable(name, len, 0, rettv, NULL, EVAL_VAR_IMPORT) == FAIL)
|
||||
return FAIL;
|
||||
if (rettv->v_type == VAR_ANY && *s == '.')
|
||||
{
|
||||
int sid = rettv->vval.v_number;
|
||||
return eval_variable(s + 1, 0, sid, rettv, NULL, 0);
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Check if variable "name[len]" is a local variable or an argument.
|
||||
* If so, "*eval_lavars_used" is set to TRUE.
|
||||
|
Reference in New Issue
Block a user