aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.h
diff options
context:
space:
mode:
authorYochem van Rosmalen <git@yochem.nl>2025-06-29 17:19:10 +0200
committerGitHub <noreply@github.com>2025-06-29 10:19:10 -0500
commitf7c939fa7af9744bcb6d79100a7e126f7e9c8f5c (patch)
tree9e093432a76e557973923009ad7a64251384d0a6 /src/nvim/lua/executor.h
parent2f95abddfaf8921555a7e252fc77ed26cbb4de5c (diff)
downloadrneovim-f7c939fa7af9744bcb6d79100a7e126f7e9c8f5c.tar.gz
rneovim-f7c939fa7af9744bcb6d79100a7e126f7e9c8f5c.tar.bz2
rneovim-f7c939fa7af9744bcb6d79100a7e126f7e9c8f5c.zip
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()`.
Diffstat (limited to 'src/nvim/lua/executor.h')
-rw-r--r--src/nvim/lua/executor.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/lua/executor.h b/src/nvim/lua/executor.h
index 557c0b025e..77cd30246d 100644
--- a/src/nvim/lua/executor.h
+++ b/src/nvim/lua/executor.h
@@ -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 { \