-
Notifications
You must be signed in to change notification settings - Fork 274
(v2) feat: add underline style and color #491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v2-exp
Are you sure you want to change the base?
Conversation
687d00d
to
1b42b6d
Compare
This adds support for setting the underline style and color. The underline style can be set to single, double, curly, dotted, or dashed. The color of the underline can be set to any color. See https://sw.kovidgoyal.net/kitty/underlines/
1b42b6d
to
5e542b8
Compare
This looks good, though we may want to switch the adjective-noun order on the costs for better completions with LSPs: // Before
NoUnderline
SingleUnderline
CurlyUnderline
// After
UnderlineNone
UnderlineSingle
UnderlineCurly On the other hand, we already have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make the following API change:
// Before
NoUnderline
SingleUnderline
CurlyUnderline
// After
UnderlineNone
UnderlineSingle
UnderlineCurly
And also put caveats in the GoDocs to help users understand cases where this is and isn't supported.
Otherwise, this is good.
Also a question: how does this behave in unsupported terminals? Will it fall back to having a normal underline? If not, can we make it fall back accordingly? |
7c1f4fe
to
354e70d
Compare
It depends on the terminal and how they interpret the sequence. Apple Terminal for example, behaves incorrectly and doesn't support neither underline styles nor underline colors. |
@aymanbagabas in that case what happens? Does it underline at all? |
No, it doesn't underline and instead writes the text with a background color. |
This adds support for setting the underline style and color. The underline style can be set to single, double, curly, dotted, or dashed. The color of the underline can be set to any color.
See https://sw.kovidgoyal.net/kitty/underlines/
Fixes: #488