0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

patch 9.0.0912: libvterm with modifyOtherKeys level 2 does not match xterm

Problem:    libvterm with modifyOtherKeys level 2 does not match xterm.
Solution:   Adjust key code escape sequences to be the same as what xterm
            sends in modifyOtherKeys level 2 mode.  Check the value of
            no_reduce_keys before using it.
This commit is contained in:
Bram Moolenaar
2022-11-19 19:02:40 +00:00
parent e6392b1021
commit c896adbcde
8 changed files with 70 additions and 13 deletions

View File

@@ -1516,7 +1516,8 @@ find_special_key(
* CTRL-2 is CTRL-@
* CTRL-6 is CTRL-^
* CTRL-- is CTRL-_
* Also, <C-H> and <C-h> mean the same thing, always use "H".
* Also, unless no_reduce_keys is set then <C-H> and <C-h> mean the same thing,
* use "H".
* Returns the possibly adjusted key.
*/
int
@@ -1525,7 +1526,12 @@ may_adjust_key_for_ctrl(int modifiers, int key)
if (modifiers & MOD_MASK_CTRL)
{
if (ASCII_ISALPHA(key))
return TOUPPER_ASC(key);
{
#ifdef FEAT_TERMINAL
check_no_reduce_keys(); // may update the no_reduce_keys flag
#endif
return no_reduce_keys == 0 ? TOUPPER_ASC(key) : key;
}
if (key == '2')
return '@';
if (key == '6')