Mercurial > vim
comparison src/map.c @ 28686:141fb1d233ba v8.2.4867
patch 8.2.4867: listing of mapping with K_SPECIAL is wrong
Commit: https://github.com/vim/vim/commit/ac402f4d64bec6b6efd809fef52f5b34627bf947
Author: zeertzjq <zeertzjq@outlook.com>
Date: Wed May 4 18:51:43 2022 +0100
patch 8.2.4867: listing of mapping with K_SPECIAL is wrong
Problem: Listing of mapping with K_SPECIAL is wrong.
Solution: Adjust escaping of special characters. (closes https://github.com/vim/vim/issues/10351)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 04 May 2022 20:00:03 +0200 |
parents | 38f7a132bba3 |
children | d770568e6c98 |
comparison
equal
deleted
inserted
replaced
28685:9d93cac8b406 | 28686:141fb1d233ba |
---|---|
187 // Use FALSE below if we only want things like <Up> to show up as such on | 187 // Use FALSE below if we only want things like <Up> to show up as such on |
188 // the rhs, and not M-x etc, TRUE gets both -- webb | 188 // the rhs, and not M-x etc, TRUE gets both -- webb |
189 if (*mp->m_str == NUL) | 189 if (*mp->m_str == NUL) |
190 msg_puts_attr("<Nop>", HL_ATTR(HLF_8)); | 190 msg_puts_attr("<Nop>", HL_ATTR(HLF_8)); |
191 else | 191 else |
192 { | 192 msg_outtrans_special(mp->m_str, FALSE, 0); |
193 // Remove escaping of CSI, because "m_str" is in a format to be used | |
194 // as typeahead. | |
195 char_u *s = vim_strsave(mp->m_str); | |
196 if (s != NULL) | |
197 { | |
198 vim_unescape_csi(s); | |
199 msg_outtrans_special(s, FALSE, 0); | |
200 vim_free(s); | |
201 } | |
202 } | |
203 #ifdef FEAT_EVAL | 193 #ifdef FEAT_EVAL |
204 if (p_verbose > 0) | 194 if (p_verbose > 0) |
205 last_set_msg(mp->m_script_ctx); | 195 last_set_msg(mp->m_script_ctx); |
206 #endif | 196 #endif |
207 msg_clr_eos(); | 197 msg_clr_eos(); |