aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-03-07 00:28:53 +0100
committerGitHub <noreply@github.com>2023-03-07 00:28:53 +0100
commit39096f48f0a632870f0792955b37dc32e77458fb (patch)
treed3771db3f27af30dfcfd67599614b610ceee688d /src/nvim/lua/executor.c
parent6aa5346b04d6ffbac1ba8fc5626182c16b5ad947 (diff)
parent79571b92ced968ad27bee2a7515a4a04e84dbad2 (diff)
downloadrneovim-39096f48f0a632870f0792955b37dc32e77458fb.tar.gz
rneovim-39096f48f0a632870f0792955b37dc32e77458fb.tar.bz2
rneovim-39096f48f0a632870f0792955b37dc32e77458fb.zip
Merge pull request #13834 from bfredl/omnilua
omnifunc for builtin lua
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 5ec91aebb0..078bc4fea9 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -1857,6 +1857,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));