Skip to content

Commit 63a36a1

Browse files
committed
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
1 parent 057084a commit 63a36a1

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

kitty/terminfo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ def encode_keystring(keybytes: bytes) -> str:
231231
'smso': r'\E[7m',
232232
# Enter underline mode
233233
'smul': r'\E[4m',
234+
'Smulx': r'\E[4:%p1%dm', # this is a non-standard extension that some terminals use, so match them
234235
# Enter strikethrough mode
235236
'smxx': r'\E[9m',
236237
# Clear all tab stops
@@ -436,7 +437,7 @@ def encode_keystring(keybytes: bytes) -> str:
436437
queryable_capabilities.update(string_capabilities)
437438
extra = (bool_capabilities | numeric_capabilities.keys() | string_capabilities.keys()) - set(termcap_aliases.values())
438439
no_termcap_for = frozenset(
439-
'Su Tc setrgbf setrgbb fullkbd kUP kDN'.split() + [
440+
'Su Smulx Tc setrgbf setrgbb fullkbd kUP kDN'.split() + [
440441
'k{}{}'.format(key, mod)
441442
for key in 'UP DN RIT LFT END HOM IC DC PRV NXT'.split()
442443
for mod in range(3, 8)])

terminfo/kitty.terminfo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ xterm-kitty|KovIdTTY,
1616
it#8,
1717
lines#24,
1818
pairs#32767,
19+
Smulx=\E[4:%p1%dm,
1920
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
2021
bel=^G,
2122
bold=\E[1m,

terminfo/x/xterm-kitty

21 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)