mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 05:05:00 -07:00
fix(eval): v:lua support for -
in module names
This commit is contained in:
parent
6cb670cb2c
commit
fb8cd340dc
@ -8956,7 +8956,7 @@ static bool tv_is_luafunc(typval_T *tv)
|
||||
const char *skip_luafunc_name(const char *p)
|
||||
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
{
|
||||
while (ASCII_ISALNUM(*p) || *p == '_' || *p == '.' || *p == '\'') {
|
||||
while (ASCII_ISALNUM(*p) || *p == '_' || *p == '-' || *p == '.' || *p == '\'') {
|
||||
p++;
|
||||
}
|
||||
return p;
|
||||
|
@ -0,0 +1 @@
|
||||
return {doit=function() return 9004 end}
|
@ -532,6 +532,7 @@ describe('v:lua', function()
|
||||
command('set pp+=test/functional/fixtures')
|
||||
eq('\tbadval', eval("v:lua.require'leftpad'('badval')"))
|
||||
eq(9003, eval("v:lua.require'bar'.doit()"))
|
||||
eq(9004, eval("v:lua.require'baz-quux'.doit()"))
|
||||
end)
|
||||
|
||||
it('throw errors for invalid use', function()
|
||||
|
Loading…
Reference in New Issue
Block a user