Skip to content

Commit 41b2446

Browse files
committed
Check for underline term capability flag
A few terminals (Kitty) only set the Su cap not Smulx, we should recognise either as sufficient for fancy underlines.
1 parent 987f776 commit 41b2446

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/io.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ function termstyle(io::IO, face::Face, lastface::Face=getface())
183183
# Kitty fancy underlines, see <https://sw.kovidgoyal.net/kitty/underlines>
184184
# Supported in Kitty, VTE, iTerm2, Alacritty, and Wezterm.
185185
face.underline == lastface.underline ||
186-
if haskey(Base.current_terminfo, :set_underline_style)
186+
if haskey(Base.current_terminfo, :set_underline_style) ||
187+
get(Base.current_terminfo, :can_style_underline, false)
187188
if face.underline isa Tuple # Color and style
188189
color, style = face.underline
189190
print(io, "\e[4:",

0 commit comments

Comments
 (0)