mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 15:08:35 +00:00
feat(:source, nvim_exec): support script-local variables
Based on #13143 (and #11507) with changes: - Omit script_type_E. Use sn_name == NULL to determine anon items. - Keep SID_STR. Used by anon :source for .lua files (no item). - Show SID in get_scriptname output (:verbose set). - Factor item creation into new_script_item. - Leave sc_seq = 0 (anon scripts don't re-use the same item when re-sourced). - Add tests for anon :source. Co-authored-by: Vikram Pal <vikrampal659@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
This commit is contained in:
@@ -335,7 +335,7 @@ EXTERN int garbage_collect_at_exit INIT(= false);
|
||||
#define SID_WINLAYOUT -7 // changing window size
|
||||
#define SID_LUA -8 // for Lua scripts/chunks
|
||||
#define SID_API_CLIENT -9 // for API clients
|
||||
#define SID_STR -10 // for sourcing a string
|
||||
#define SID_STR -10 // for sourcing a string with no script item
|
||||
|
||||
// Script CTX being sourced or was sourced to define the current function.
|
||||
EXTERN sctx_T current_sctx INIT(= { 0 COMMA 0 COMMA 0 });
|
||||
|
Reference in New Issue
Block a user