diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-05 14:10:32 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-09-05 14:10:32 -0700 |
commit | 8b06231612cd608b2dce5e0a09bf40192a4803cb (patch) | |
tree | 04fbfef7b326574e296b2fe1a772829ac0af8be4 /src/nvim/eval/typval.h | |
parent | 096212d52c6375c19c046d86a7178bae91e287fc (diff) | |
parent | d3f1eb3024fa297c970a79dd24ef818e4aeb8525 (diff) | |
download | rneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.tar.gz rneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.tar.bz2 rneovim-8b06231612cd608b2dce5e0a09bf40192a4803cb.zip |
Merge #10869 'vim-patch:8.1.{0309,0362,0365,0515,1946}'
Diffstat (limited to 'src/nvim/eval/typval.h')
-rw-r--r-- | src/nvim/eval/typval.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/nvim/eval/typval.h b/src/nvim/eval/typval.h index 5c0f872b38..823367560a 100644 --- a/src/nvim/eval/typval.h +++ b/src/nvim/eval/typval.h @@ -248,6 +248,18 @@ typedef int scid_T; /// Format argument for scid_T #define PRIdSCID "d" +// SCript ConteXt (SCTX): identifies a script script line. +// When sourcing a script "sc_lnum" is zero, "sourcing_lnum" is the current +// line number. When executing a user function "sc_lnum" is the line where the +// function was defined, "sourcing_lnum" is the line number inside the +// function. When stored with a function, mapping, option, etc. "sc_lnum" is +// the line number in the script "sc_sid". +typedef struct { + scid_T sc_sid; // script ID + int sc_seq; // sourcing sequence number + linenr_T sc_lnum; // line number +} sctx_T; + // Structure to hold info for a function that is currently being executed. typedef struct funccall_S funccall_T; @@ -275,7 +287,7 @@ struct ufunc { proftime_T uf_tml_wait; ///< start wait time for current line int uf_tml_idx; ///< index of line being timed; -1 if none int uf_tml_execed; ///< line being timed was executed - scid_T uf_script_ID; ///< ID of script where function was defined, + sctx_T uf_script_ctx; ///< SCTX where function was defined, ///< used for s: variables int uf_refcount; ///< reference count, see func_name_refcount() funccall_T *uf_scoped; ///< l: local variables for closure |