From 63a36a1054fbed1977dae0f8fb266ed84e3787cb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 14 Jun 2021 11:58:52 +0530 Subject: [PATCH] Add Smulx to terminfo A couple of other terminals use it for styled underlines, in contravention of the spec. But, in the interests of wider interoperability add it to kitty as well. Fixes #3725 --- kitty/terminfo.py | 3 ++- terminfo/kitty.terminfo | 1 + terminfo/x/xterm-kitty | Bin 3255 -> 3276 bytes 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/kitty/terminfo.py b/kitty/terminfo.py index 63fc9ab63..b8d9de169 100644 --- a/kitty/terminfo.py +++ b/kitty/terminfo.py @@ -231,6 +231,7 @@ string_capabilities = { 'smso': r'\E[7m', # Enter underline mode 'smul': r'\E[4m', + 'Smulx': r'\E[4:%p1%dm', # this is a non-standard extension that some terminals use, so match them # Enter strikethrough mode 'smxx': r'\E[9m', # Clear all tab stops @@ -436,7 +437,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( - 'Su Tc setrgbf setrgbb fullkbd kUP kDN'.split() + [ + 'Su Smulx Tc setrgbf setrgbb fullkbd kUP kDN'.split() + [ 'k{}{}'.format(key, mod) for key in 'UP DN RIT LFT END HOM IC DC PRV NXT'.split() for mod in range(3, 8)]) diff --git a/terminfo/kitty.terminfo b/terminfo/kitty.terminfo index d081293ab..f74dc4e89 100644 --- a/terminfo/kitty.terminfo +++ b/terminfo/kitty.terminfo @@ -16,6 +16,7 @@ xterm-kitty|KovIdTTY, it#8, lines#24, pairs#32767, + Smulx=\E[4:%p1%dm, acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, bold=\E[1m, diff --git a/terminfo/x/xterm-kitty b/terminfo/x/xterm-kitty index bde658ee9a37c5a29d40ca88866ce850a76d88a7..7b1a2abb5050d31e5d92004fbec06a6aa5d0a192 100644 GIT binary patch delta 244 zcmWO0&qsrC0LSt7$NDv6hm<@vHRjO|Di3S+BPv-mqLjoUCMkMmhi0kGrbEmwF&Q1Y z?be|@htzF!=n!4fty{Nl-MaPt3tq2B>&?3V7^o#F(c_Z@1Q^63!Z!vZ`w9 z!H~WLeFPaY>?lztn8qPannf}OUuT>Qw@1{R11fFz)~W delta 223 zcmWN~y-Nad0LS6a*Mocsf(+pdC8#JY3L}f-8Uhm`A#jKsiiRL4h>#2dhiqxlgP?1% zttHwD1f!v?O{Z*WYinx>w}yVtKk#(p&+(^^P|cyjZ$J_dWQZ6ECYWIXhgI@yu*o)i z98%_tb1w1lx#f-r9%=K+8y(*H2mM4s+V zXfd#C$`Ndmj5EzFX_jzJoTEUIEp|+Oz%i#(xiER1D{g4|jc_U&)2JyXmD0QxO|qs| LFZ`m`^`NVN6fZ1l