Mercurial > vim
diff src/getchar.c @ 31156:0ecb16d5f86f v9.0.0912
patch 9.0.0912: libvterm with modifyOtherKeys level 2 does not match xterm
Commit: https://github.com/vim/vim/commit/c896adbcdee8b2296433a61c1f009aae9f68a594
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 19 19:02:40 2022 +0000
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 19 Nov 2022 20:15:03 +0100 |
parents | a52697bcffa6 |
children | 25f6c7f77c70 |
line wrap: on
line diff
--- a/src/getchar.c +++ b/src/getchar.c @@ -2778,6 +2778,9 @@ handle_mapping( // If no termcode matched, try to include the modifier into the // key. This is for when modifyOtherKeys is working. +#ifdef FEAT_TERMINAL + check_no_reduce_keys(); // may update the no_reduce_keys flag +#endif if (keylen == 0 && !no_reduce_keys) { keylen = check_simplify_modifier(max_mlen + 1); @@ -3919,9 +3922,9 @@ getcmdkeycmd( { // CTRL-V is followed by octal, hex or other characters, reverses // what AppendToRedobuffLit() does. - no_reduce_keys = TRUE; // don't merge modifyOtherKeys + ++no_reduce_keys; // don't merge modifyOtherKeys c1 = get_literal(TRUE); - no_reduce_keys = FALSE; + --no_reduce_keys; } if (got_int)