diff options
Diffstat (limited to 'src/globals.h')
-rw-r--r-- | src/globals.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/globals.h b/src/globals.h index 87f7b0be5..acdce7096 100644 --- a/src/globals.h +++ b/src/globals.h @@ -266,8 +266,15 @@ EXTERN int lines_left INIT(= -1); // lines left for listing EXTERN int msg_no_more INIT(= FALSE); // don't use more prompt, truncate // messages -EXTERN char_u *sourcing_name INIT( = NULL);// name of error message source -EXTERN linenr_T sourcing_lnum INIT(= 0); // line number of the source file +/* + * Stack of execution contexts. Each entry is an estack_T. + * Current context is at ga_len - 1. + */ +EXTERN garray_T exestack INIT(= {0 COMMA 0 COMMA sizeof(estack_T) COMMA 50 COMMA NULL}); +// name of error message source +#define SOURCING_NAME (((estack_T *)exestack.ga_data)[exestack.ga_len - 1].es_name) +// line number in the message source or zero +#define SOURCING_LNUM (((estack_T *)exestack.ga_data)[exestack.ga_len - 1].es_lnum) #ifdef FEAT_EVAL EXTERN int ex_nesting_level INIT(= 0); // nesting level |