summaryrefslogtreecommitdiffstats
path: root/src/map.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-09-12 13:38:41 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-12 13:38:41 +0100
commitcdc839353f68ca43db6446e1b727fc7ba657b738 (patch)
tree0729860faa774e594b183ce0823ae23776b92701 /src/map.c
parent5a4eb55122e45444d3a6c56ce108ce29bc8e52ab (diff)
patch 9.0.0449: there is no easy way to translate a key code into a stringv9.0.0449
Problem: There is no easy way to translate a string with a key code into a readable string. Solution: Add the keytrans() function. (closes #11114)
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map.c b/src/map.c
index 140cbc84f8..d063e053ae 100644
--- a/src/map.c
+++ b/src/map.c
@@ -2317,7 +2317,7 @@ mapblock2dict(
int buffer_local, // false if not buffer local mapping
int abbr) // true if abbreviation
{
- char_u *lhs = str2special_save(mp->m_keys, TRUE);
+ char_u *lhs = str2special_save(mp->m_keys, TRUE, FALSE);
char_u *mapmode = map_mode_to_chars(mp->m_mode);
dict_add_string(dict, "lhs", lhs);
@@ -2409,7 +2409,7 @@ get_maparg(typval_T *argvars, typval_T *rettv, int exact)
if (*rhs == NUL)
rettv->vval.v_string = vim_strsave((char_u *)"<Nop>");
else
- rettv->vval.v_string = str2special_save(rhs, FALSE);
+ rettv->vval.v_string = str2special_save(rhs, FALSE, FALSE);
}
}
@@ -2478,7 +2478,7 @@ f_maplist(typval_T *argvars UNUSED, typval_T *rettv)
keys_buf = NULL;
did_simplify = FALSE;
- lhs = str2special_save(mp->m_keys, TRUE);
+ lhs = str2special_save(mp->m_keys, TRUE, FALSE);
(void)replace_termcodes(lhs, &keys_buf, flags, &did_simplify);
vim_free(lhs);