Add the XM and xm terminfo capabilities

These are apparently used by vim for mouse protocol detection. Sigh.
This commit is contained in:
Kovid Goyal 2024-04-05 08:08:00 +05:30
parent 1bffe89b5d
commit 9faeb3e2ce
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
4 changed files with 9 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -181,6 +181,10 @@ string_capabilities = {
'kbs': r'\177',
# Mouse event has occurred
'kmous': r'\E[M',
# Turn on mouse reporting
'XM': '\E[?1006;1004;1000%?%p1%{1}%=%th%el%;',
# Expected format for mouse reporting escape codes
'xm': r'\E[<%i%p3%d;%p1%d;%p2%d;%?%p4%tM%em%;',
# Scroll backwards (reverse index)
'kri': r'\E[1;2A',
# scroll forwards (index)
@ -481,7 +485,7 @@ queryable_capabilities = cast(Dict[str, str], numeric_capabilities.copy())
queryable_capabilities.update(string_capabilities)
extra = (bool_capabilities | numeric_capabilities.keys() | string_capabilities.keys()) - set(termcap_aliases.values())
no_termcap_for = frozenset(
'XR Ms RV kxIN kxOUT Cr Cs Se Ss Setulc Su Smulx Sync Tc PS PE BE BD setrgbf setrgbb fullkbd kUP kDN kbeg kBEG fe fd XF'.split() + [
'XR XM xm Ms RV kxIN kxOUT Cr Cs Se Ss Setulc Su Smulx Sync Tc PS PE BE BD setrgbf setrgbb fullkbd kUP kDN kbeg kBEG fe fd XF'.split() + [
f'k{key}{mod}'
for key in 'UP DN RIT LFT BEG END HOM IC DC PRV NXT'.split()
for mod in range(3, 8)])

View file

@ -30,6 +30,7 @@ xterm-kitty|KovIdTTY,
Smulx=\E[4:%p1%dm,
Ss=\E[%p1%d\sq,
Sync=\EP=%p1%ds\E\\,
XM=\E[?1006;1004;1000%?%p1%{1}%=%th%el%;,
XR=\E[>0q,
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G,
@ -267,3 +268,4 @@ xterm-kitty|KovIdTTY,
u8=\E[?%[;0123456789]c,
u9=\E[c,
vpa=\E[%i%p1%dd,
xm=\E[<%i%p3%d;%p1%d;%p2%d;%?%p4%tM%em%;,

BIN
terminfo/x/xterm-kitty generated

Binary file not shown.