From 41b2446555a6e99c8bfc77f3a15137082b5c10af Mon Sep 17 00:00:00 2001 From: TEC Date: Wed, 31 Jul 2024 18:40:46 +0800 Subject: [PATCH] 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. --- src/io.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/io.jl b/src/io.jl index 4e3a3bc..c2421d2 100644 --- a/src/io.jl +++ b/src/io.jl @@ -183,7 +183,8 @@ function termstyle(io::IO, face::Face, lastface::Face=getface()) # Kitty fancy underlines, see # Supported in Kitty, VTE, iTerm2, Alacritty, and Wezterm. face.underline == lastface.underline || - if haskey(Base.current_terminfo, :set_underline_style) + if haskey(Base.current_terminfo, :set_underline_style) || + get(Base.current_terminfo, :can_style_underline, false) if face.underline isa Tuple # Color and style color, style = face.underline print(io, "\e[4:",