diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-09-13 06:23:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-13 06:23:33 +0800 |
commit | 907fc8ac373226556b84c2fdc4fe26525bbdb2c4 (patch) | |
tree | 42fc5a92284c1b52c0fbdda07964245dee57edf5 /src/nvim/message.c | |
parent | 91a150d0a9f81d8db34ba45de2a8a270010e2f3a (diff) | |
download | rneovim-907fc8ac373226556b84c2fdc4fe26525bbdb2c4.tar.gz rneovim-907fc8ac373226556b84c2fdc4fe26525bbdb2c4.tar.bz2 rneovim-907fc8ac373226556b84c2fdc4fe26525bbdb2c4.zip |
vim-patch:9.0.0449: there is no easy way to translate a key code into a string (#20168)
Problem: There is no easy way to translate a string with a key code into a
readable string.
Solution: Add the keytrans() function. (closes vim/vim#11114)
https://github.com/vim/vim/commit/cdc839353f68ca43db6446e1b727fc7ba657b738
vim-patch:7b2d87220c6c
Add missing part of patch
https://github.com/vim/vim/commit/7b2d87220c6c974d5cdae672b6f9620a6bcbd1dc
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r-- | src/nvim/message.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c index 46f6adec47..fd8aa00d7b 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -1681,8 +1681,8 @@ int msg_outtrans_special(const char *strstart, bool from, int maxlen) /// Used for lhs or rhs of mappings. /// /// @param[in] str String to convert. -/// @param[in] replace_spaces Convert spaces into `<Space>`, normally used fo -/// lhs, but not rhs. +/// @param[in] replace_spaces Convert spaces into `<Space>`, normally used for +/// lhs of mapping and keytrans(), but not rhs. /// @param[in] replace_lt Convert `<` into `<lt>`. /// /// @return [allocated] Converted string. @@ -1704,8 +1704,8 @@ char *str2special_save(const char *const str, const bool replace_spaces, const b /// Convert character, replacing key with printable representation. /// /// @param[in,out] sp String to convert. Is advanced to the next key code. -/// @param[in] replace_spaces Convert spaces into <Space>, normally used for -/// lhs, but not rhs. +/// @param[in] replace_spaces Convert spaces into `<Space>`, normally used for +/// lhs of mapping and keytrans(), but not rhs. /// @param[in] replace_lt Convert `<` into `<lt>`. /// /// @return Converted key code, in a static buffer. Buffer is always one and the |