diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-12-24 21:56:41 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-12-24 21:56:41 +0100 |
commit | 4aab88d919168ce2ddf4845482f4cff9efa52b5b (patch) | |
tree | 04a73eecb83ace36a383230c41be60813dc26ba8 /src/structs.h | |
parent | 38455a921395a56690790c8c1d28c1c43ca04c8a (diff) |
patch 8.2.2208: Vim9: after reloading a script variable index may be invalidv8.2.2208
Problem: Vim9: after reloading a script variable index may be invalid.
Solution: When the sequence number doesn't match give an error for using a
script-local variable from a compiled function. (closes #7547)
Diffstat (limited to 'src/structs.h')
-rw-r--r-- | src/structs.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/structs.h b/src/structs.h index 14f382765c..ea994f8b70 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1790,13 +1790,12 @@ typedef struct { } imported_T; /* - * Growarray to store info about already sourced scripts. - * For Unix also store the dev/ino, so that we don't have to stat() each - * script when going through the list. + * Info about an already sourced scripts. */ typedef struct { char_u *sn_name; + int sn_script_seq; // latest sctx_T sc_seq value // "sn_vars" stores the s: variables currently valid. When leaving a block // variables local to that block are removed. |