diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-01-12 20:04:51 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-01-12 20:04:51 +0000 |
commit | 4059400993ff380414dce9b577eff0f8c86b7725 (patch) | |
tree | 7fc2fad665a3c73e91580f56134e280445486670 /src/evalvars.c | |
parent | a86655af84f1596f0f3ef22813724fe06f1e4809 (diff) |
patch 9.0.1186: imported class does not work when used twice in a linev9.0.1186
Problem: Imported class does not work when used twice in a line.
Solution: Fix the type parsing.
Diffstat (limited to 'src/evalvars.c')
-rw-r--r-- | src/evalvars.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/evalvars.c b/src/evalvars.c index e473e48763..8061a5096d 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -3122,8 +3122,12 @@ eval_variable_import( return FAIL; if (rettv->v_type == VAR_ANY && *s == '.') { + char_u *ns = s + 1; + s = ns; + while (ASCII_ISALNUM(*s) || *s == '_') + ++s; int sid = rettv->vval.v_number; - return eval_variable(s + 1, 0, sid, rettv, NULL, 0); + return eval_variable(ns, (int)(s - ns), sid, rettv, NULL, 0); } return OK; } |