aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-01-27 09:00:28 +0100
committerbfredl <bjorn.linse@gmail.com>2023-03-06 23:12:21 +0100
commit79571b92ced968ad27bee2a7515a4a04e84dbad2 (patch)
tree3e681a92b6fc113390f68ad2f39b91699e57c508 /src/nvim/lua/executor.c
parented05d38d9fa643c7e562b754c6cfed8b9da5c4d8 (diff)
downloadrneovim-79571b92ced968ad27bee2a7515a4a04e84dbad2.tar.gz
rneovim-79571b92ced968ad27bee2a7515a4a04e84dbad2.tar.bz2
rneovim-79571b92ced968ad27bee2a7515a4a04e84dbad2.zip
feat(lua): omnifunc for builting lua interpreter
also make implicit submodules "uri" and "_inspector" work with completion this is needed for `:lua=vim.uri_<tab>` wildmenu completion to work even before uri or _inspector functions are used.
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r--src/nvim/lua/executor.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index bb461a7f13..8a50c8fe4f 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -1872,6 +1872,12 @@ int nlua_expand_pat(expand_T *xp, char *pat, int *num_results, char ***results)
lua_getfield(lstate, -1, "_expand_pat");
luaL_checktype(lstate, -1, LUA_TFUNCTION);
+ // ex expansion prepends a ^, but don't worry, it is not a regex
+ if (pat[0] != '^') {
+ return FAIL;
+ }
+ pat++;
+
// [ vim, vim._expand_pat, buf ]
lua_pushlstring(lstate, (const char *)pat, strlen(pat));