vim-patch:8.1.0362: cannot get the script line number when executing a function

Problem:    Cannot get the script line number when executing a function.
Solution:   Store the line number besides the script ID. (Ozaki Kiichi,
            closes vim/vim#3362)  Also display the line number with ":verbose set".
f29c1c6aa3
This commit is contained in:
erw7
2019-08-25 13:45:45 +09:00
parent 38806f23ed
commit a2e48b556b
24 changed files with 342 additions and 197 deletions

View File

@@ -332,8 +332,8 @@ EXTERN int garbage_collect_at_exit INIT(= false);
#define SID_LUA -7 // for Lua scripts/chunks
#define SID_API_CLIENT -8 // for API clients
// ID of script being sourced or was sourced to define the current function.
EXTERN scid_T current_SID INIT(= 0);
// Script CTX being sourced or was sourced to define the current function.
EXTERN sctx_T current_sctx INIT(= { 0 COMMA 0 });
// ID of the current channel making a client API call
EXTERN uint64_t current_channel_id INIT(= 0);
@@ -342,8 +342,8 @@ EXTERN bool did_source_packages INIT(= false);
// Scope information for the code that indirectly triggered the current
// provider function call
EXTERN struct caller_scope {
scid_T SID;
uint8_t *sourcing_name, *autocmd_fname, *autocmd_match;
sctx_T script_ctx;
uint8_t *sourcing_name, *autocmd_fname, *autocmd_match;
linenr_T sourcing_lnum;
int autocmd_bufnr;
void *funccalp;