API: nvim_source: save/restore script context #11159

Use a constant for the script id.
This commit is contained in:
Vikram Pal
2019-10-05 20:07:27 +05:30
committed by Justin M. Keyes
parent 6aa03e86da
commit 0a8d145075
3 changed files with 11 additions and 7 deletions

View File

@@ -331,6 +331,7 @@ EXTERN int garbage_collect_at_exit INIT(= false);
#define SID_NONE -6 // don't set scriptID
#define SID_LUA -7 // for Lua scripts/chunks
#define SID_API_CLIENT -8 // for API clients
#define SID_STR -9 // for sourcing a string
// Script CTX being sourced or was sourced to define the current function.
EXTERN sctx_T current_sctx INIT(= { 0 COMMA 0 COMMA 0 });