1
0
forked from aniani/vim

patch 8.2.0491: cannot recognize a <script> mapping using maparg()

Problem:    Cannot recognize a <script> mapping using maparg().
Solution:   Add the "script" key. (closes #5873)
This commit is contained in:
Bram Moolenaar
2020-04-01 19:22:12 +02:00
parent 0afdcf8601
commit 2da0f0c445
4 changed files with 9 additions and 4 deletions

View File

@@ -2200,6 +2200,8 @@ get_maparg(typval_T *argvars, typval_T *rettv, int exact)
dict_add_string(dict, "lhs", lhs);
dict_add_string(dict, "rhs", mp->m_orig_str);
dict_add_number(dict, "noremap", mp->m_noremap ? 1L : 0L);
dict_add_number(dict, "script", mp->m_noremap == REMAP_SCRIPT
? 1L : 0L);
dict_add_number(dict, "expr", mp->m_expr ? 1L : 0L);
dict_add_number(dict, "silent", mp->m_silent ? 1L : 0L);
dict_add_number(dict, "sid", (long)mp->m_script_ctx.sc_sid);