message: Add support for replacing < to str2special

This commit is contained in:
ZyX
2017-07-02 19:37:21 +03:00
parent a1fee487ba
commit 24f0056ca5
4 changed files with 26 additions and 18 deletions

View File

@@ -12120,7 +12120,7 @@ static void get_maparg(typval_T *argvars, typval_T *rettv, int exact)
// Return a string.
if (rhs != NULL) {
rettv->vval.v_string = (char_u *)str2special_save(
(const char *)rhs, false);
(const char *)rhs, false, false);
}
} else {
@@ -12157,7 +12157,7 @@ void mapblock_fill_dict(dict_T *const dict,
FUNC_ATTR_NONNULL_ALL
{
char *const lhs = str2special_save((const char *)mp->m_keys,
compatible ? true : false);
compatible, !compatible);
char *const mapmode = map_mode_to_chars(mp->m_mode);
varnumber_T noremap_value;
@@ -12175,7 +12175,8 @@ void mapblock_fill_dict(dict_T *const dict,
tv_dict_add_str(dict, S_LEN("rhs"), (const char *)mp->m_orig_str);
} else {
tv_dict_add_allocated_str(dict, S_LEN("rhs"),
str2special_save((const char *)mp->m_str, false));
str2special_save((const char *)mp->m_str, false,
true));
}
tv_dict_add_allocated_str(dict, S_LEN("lhs"), lhs);
tv_dict_add_nr(dict, S_LEN("noremap"), noremap_value);