mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 06:45:37 +00:00
fix(exrc): exrc knows its own location (#34638)
fix(exrc): lua exrc files know their location Problem: 'exrc' files are inherently bound to their location / workspace and therefore require to "know" their location on the filesystem. However, currently using `debug.getinfo(1, 'S')` returns `"<nvim>"`. Solution: Include the filepath as chunkname in `loadstring()` and `nlua_exec()`.
This commit is contained in:
committed by
GitHub
parent
2f95abddfa
commit
f7c939fa7a
@@ -26,7 +26,7 @@ typedef struct {
|
||||
} nlua_ref_state_t;
|
||||
|
||||
#define NLUA_EXEC_STATIC(cstr, arg, mode, arena, err) \
|
||||
nlua_exec(STATIC_CSTR_AS_STRING(cstr), arg, mode, arena, err)
|
||||
nlua_exec(STATIC_CSTR_AS_STRING(cstr), NULL, arg, mode, arena, err)
|
||||
|
||||
#define NLUA_CLEAR_REF(x) \
|
||||
do { \
|
||||
|
||||
Reference in New Issue
Block a user