Search notes:

VIM struct: sctx_T

The sctx_T struct stores a SCript ConteXt, aka SCTX.
A script context identifies a 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 (scid_T is typedef'd to an int)
    int		sc_seq;		// sourcing sequence number
    linenr_T	sc_lnum;	// line number (linenr_T is typedef'd to a long)
    int		sc_version;	// :scriptversion
} sctx_T;

See also

A pointer to a sctx_T is for example used in the AutoCmd struct.

Index