terminal: support 58;5 for setting underline color via 256 palette

Fixes #1013
This commit is contained in:
Mitchell Hashimoto
2023-12-07 14:57:07 -08:00
parent 3f76094d84
commit 84a0e4e62d
3 changed files with 19 additions and 0 deletions

View File

@@ -515,6 +515,11 @@ pub fn setAttribute(self: *Terminal, attr: sgr.Attribute) !void {
};
},
.@"256_underline_color" => |idx| {
self.screen.cursor.pen.attrs.underline_color = true;
self.screen.cursor.pen.underline_fg = self.color_palette.colors[idx];
},
.reset_underline_color => {
self.screen.cursor.pen.attrs.underline_color = false;
},