summaryrefslogtreecommitdiffstats
path: root/src/map.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-11-23 20:20:18 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-23 20:20:18 +0000
commit63a2e360cca2c70ab0a85d14771d3259d4b3aafa (patch)
tree9f0d9131e530cf658c2b7bf05e16539a1ebb0a28 /src/map.c
parent0b6d6a186e961faa5b9058406234ffd93a7e6688 (diff)
patch 9.0.0930: cannot debug the Kitty keyboard protocol with TermDebugv9.0.0930
Problem: Cannot debug the Kitty keyboard protocol with TermDebug. Solution: Add Kitty keyboard protocol support to the libvterm fork. Recognize the escape sequences that the protocol generates. Add the 'keyprotocol' option to allow the user to specify for which terminal what protocol is to be used, instead of hard-coding this. Add recognizing the kitty keyboard protocol status.
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/map.c b/src/map.c
index 4dec9e76ed..ee249c77ae 100644
--- a/src/map.c
+++ b/src/map.c
@@ -312,8 +312,27 @@ list_mappings(
// Prevent mappings to be cleared while at the more prompt.
++map_locked;
- if (p_verbose > 0 && keyround == 1 && seenModifyOtherKeys)
- msg_puts(_("Seen modifyOtherKeys: true"));
+ if (p_verbose > 0 && keyround == 1)
+ {
+ if (seenModifyOtherKeys)
+ msg_puts(_("Seen modifyOtherKeys: true"));
+ if (kitty_protocol_state != KKPS_INITIAL)
+ {
+ char *name = _("Unknown");
+ switch (kitty_protocol_state)
+ {
+ case KKPS_INITIAL: break;
+ case KKPS_OFF: name = _("Off"); break;
+ case KKPS_ENABLED: name = _("On"); break;
+ case KKPS_DISABLED: name = _("Disabled"); break;
+ case KKPS_AFTER_T_KE: name = _("Cleared"); break;
+ }
+
+ char buf[200];
+ vim_snprintf(buf, sizeof(buf), _("Kitty keyboard protocol: %s"), name);
+ msg_puts(buf);
+ }
+ }
// need to loop over all global hash lists
for (int hash = 0; hash < 256 && !got_int; ++hash)