aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/runtime.h
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-02-16 12:40:46 +0800
committerGitHub <noreply@github.com>2023-02-16 12:40:46 +0800
commit631775c05d257e5e61af31d20d9fd5be2dba82c2 (patch)
tree1a5a45358dc499a7b620c0b6b0887aafd98c8f3f /src/nvim/runtime.h
parent5dc4eaf386d70b9bbef321a00bcbb5d475f36542 (diff)
parent0cbbe27e93e87a5336673e0529b011313c51a123 (diff)
downloadrneovim-631775c05d257e5e61af31d20d9fd5be2dba82c2.tar.gz
rneovim-631775c05d257e5e61af31d20d9fd5be2dba82c2.tar.bz2
rneovim-631775c05d257e5e61af31d20d9fd5be2dba82c2.zip
Merge pull request #22277 from zeertzjq/vim-8.2.0114
vim-patch:8.2.{0114,0154}: info about sourced scripts is scattered
Diffstat (limited to 'src/nvim/runtime.h')
-rw-r--r--src/nvim/runtime.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/nvim/runtime.h b/src/nvim/runtime.h
index 97063b900c..9a810298f8 100644
--- a/src/nvim/runtime.h
+++ b/src/nvim/runtime.h
@@ -55,7 +55,16 @@ typedef enum {
ESTACK_SCRIPT,
} estack_arg_T;
-typedef struct scriptitem_S {
+/// Holds the hashtab with variables local to each sourced script.
+/// Each item holds a variable (nameless) that points to the dict_T.
+typedef struct {
+ ScopeDictDictItem sv_var;
+ dict_T sv_dict;
+} scriptvar_T;
+
+typedef struct {
+ scriptvar_T *sn_vars; ///< stores s: variables for this script
+
char *sn_name;
bool sn_prof_on; ///< true when script is/was profiled
bool sn_pr_force; ///< forceit: profile functions in this script
@@ -78,7 +87,7 @@ typedef struct scriptitem_S {
/// Growarray to store info about already sourced scripts.
extern garray_T script_items;
-#define SCRIPT_ITEM(id) (((scriptitem_T *)script_items.ga_data)[(id) - 1])
+#define SCRIPT_ITEM(id) (((scriptitem_T **)script_items.ga_data)[(id) - 1])
#define SCRIPT_ID_VALID(id) ((id) > 0 && (id) <= script_items.ga_len)
typedef void (*DoInRuntimepathCB)(char *, void *);