mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
terminal: parse all underline styles
This commit is contained in:
@ -137,6 +137,8 @@ pub const Parser = struct {
|
||||
0 => return Attribute{ .reset_underline = {} },
|
||||
1 => return Attribute{ .underline = .single },
|
||||
2 => return Attribute{ .underline = .double },
|
||||
4 => return Attribute{ .underline = .dotted },
|
||||
5 => return Attribute{ .underline = .dashed },
|
||||
|
||||
// For unknown underline styles, just render
|
||||
// a single underline.
|
||||
@ -340,6 +342,18 @@ test "sgr: underline styles" {
|
||||
try testing.expect(v == .underline);
|
||||
try testing.expect(v.underline == .single);
|
||||
}
|
||||
|
||||
{
|
||||
const v = testParseColon(&[_]u16{ 4, 4 });
|
||||
try testing.expect(v == .underline);
|
||||
try testing.expect(v.underline == .dotted);
|
||||
}
|
||||
|
||||
{
|
||||
const v = testParseColon(&[_]u16{ 4, 5 });
|
||||
try testing.expect(v == .underline);
|
||||
try testing.expect(v.underline == .dashed);
|
||||
}
|
||||
}
|
||||
|
||||
test "sgr: blink" {
|
||||
|
Reference in New Issue
Block a user