diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.lua | 1 | ||||
-rw-r--r-- | src/nvim/mapping.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 221be492af..0b81e2eb65 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -6189,6 +6189,7 @@ M.funcs = { (|mapmode-ic|) "sid" The script local ID, used for <sid> mappings (|<SID>|). Negative for special contexts. + "scriptversion" The version of the script, always 1. "lnum" The line number in "sid", zero if unknown. "nowait" Do not wait for other, longer mappings. (|:map-<nowait>|). diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c index 4435e91993..6786b5efe9 100644 --- a/src/nvim/mapping.c +++ b/src/nvim/mapping.c @@ -2113,6 +2113,7 @@ static Dictionary mapblock_fill_dict(const mapblock_T *const mp, const char *lhs PUT(dict, "expr", INTEGER_OBJ(mp->m_expr ? 1 : 0)); PUT(dict, "silent", INTEGER_OBJ(mp->m_silent ? 1 : 0)); PUT(dict, "sid", INTEGER_OBJ(mp->m_script_ctx.sc_sid)); + PUT(dict, "scriptversion", INTEGER_OBJ(1)); PUT(dict, "lnum", INTEGER_OBJ(mp->m_script_ctx.sc_lnum)); PUT(dict, "buffer", INTEGER_OBJ(buffer_value)); PUT(dict, "nowait", INTEGER_OBJ(mp->m_nowait ? 1 : 0)); |