summaryrefslogtreecommitdiffstats
path: root/src/getchar.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-11-19 19:02:40 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-19 19:02:40 +0000
commitc896adbcdee8b2296433a61c1f009aae9f68a594 (patch)
treece27f6ab71e1efa923c18ba3d557d6b21b058341 /src/getchar.c
parente6392b102151ec69fad232bcf00591230cef8e1c (diff)
patch 9.0.0912: libvterm with modifyOtherKeys level 2 does not match xtermv9.0.0912
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.
Diffstat (limited to 'src/getchar.c')
-rw-r--r--src/getchar.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/getchar.c b/src/getchar.c
index 9ead903d0a..2fa68a789f 100644
--- 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)