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.
diff --git a/src/misc2.c b/src/misc2.c
index 3067414..4de94f3 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1516,7 +1516,8 @@
* 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 @@
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')