diff options
| author | Georgi Kirilov <in.the@repo> | 2020-02-06 10:25:04 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2020-02-07 10:56:37 +0100 |
| commit | b87a64ec90ced056b96b1833477bc3253f393531 (patch) | |
| tree | d4768e7cc59e65f572bf62b2e1571acac10053b3 /vis-lua.c | |
| parent | c7d9ac4928e50f38b8855983f46e15eb1d0897cc (diff) | |
| download | vis-b87a64ec90ced056b96b1833477bc3253f393531.tar.gz vis-b87a64ec90ced056b96b1833477bc3253f393531.tar.xz | |
lua: add <plugin>/init.lua to package.path
Diffstat (limited to 'vis-lua.c')
| -rw-r--r-- | vis-lua.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2567,8 +2567,10 @@ bool vis_lua_path_add(Vis *vis, const char *path) { lua_getglobal(L, "package"); lua_pushstring(L, path); lua_pushstring(L, "/?.lua;"); - lua_getfield(L, -3, "path"); - lua_concat(L, 3); + lua_pushstring(L, path); + lua_pushstring(L, "/?/init.lua;"); + lua_getfield(L, -5, "path"); + lua_concat(L, 5); lua_setfield(L, -2, "path"); lua_pop(L, 1); /* package */ return true; |
