diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-02-26 07:40:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-25 23:40:21 +0000 |
commit | e2aca58bcc4f0aff8da9683194e4dc857a56118f (patch) | |
tree | d077b324c29de6d53ca42f9496efb9451fc40b05 /src/nvim/runtime_defs.h | |
parent | af0a2157ad2958b6c1e3c374ac247726c252c219 (diff) | |
download | rneovim-e2aca58bcc4f0aff8da9683194e4dc857a56118f.tar.gz rneovim-e2aca58bcc4f0aff8da9683194e4dc857a56118f.tar.bz2 rneovim-e2aca58bcc4f0aff8da9683194e4dc857a56118f.zip |
fix(lua): don't override script ID from :source (#32626)
Problem: When setting an option, mapping etc. from Lua without -V1, the
script ID is set to SID_LUA even if there already is a script
ID assigned by :source.
Solution: Don't set script ID to SID_LUA if it is already a Lua script.
Also add _editor.lua to ignorelist to make script context more
useful when using vim.cmd().
Diffstat (limited to 'src/nvim/runtime_defs.h')
-rw-r--r-- | src/nvim/runtime_defs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/runtime_defs.h b/src/nvim/runtime_defs.h index 7029e8be66..aa69d2581a 100644 --- a/src/nvim/runtime_defs.h +++ b/src/nvim/runtime_defs.h @@ -49,6 +49,7 @@ typedef struct { scriptvar_T *sn_vars; ///< stores s: variables for this script char *sn_name; + bool sn_lua; ///< true for a lua script bool sn_prof_on; ///< true when script is/was profiled bool sn_pr_force; ///< forceit: profile functions in this script proftime_T sn_pr_child; ///< time set when going into first child |