mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-20 12:01:34 +00:00
note charsets are TODO
This commit is contained in:
@@ -10,7 +10,13 @@ pub const Attribute = union(enum) {
|
||||
unset: void,
|
||||
|
||||
/// Unknown attribute, the raw CSI command parameters are here.
|
||||
unknown: []const u16,
|
||||
unknown: struct {
|
||||
/// Full is the full SGR input.
|
||||
full: []const u16,
|
||||
|
||||
/// Partial is the remaining, where we got hung up.
|
||||
partial: []const u16,
|
||||
},
|
||||
|
||||
/// Bold the text.
|
||||
bold: void,
|
||||
@@ -149,7 +155,7 @@ pub const Parser = struct {
|
||||
else => {},
|
||||
}
|
||||
|
||||
return Attribute{ .unknown = slice };
|
||||
return Attribute{ .unknown = .{ .full = self.params, .partial = slice } };
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -413,6 +413,13 @@ pub fn Stream(comptime Handler: type) type {
|
||||
action: Parser.Action.ESC,
|
||||
) !void {
|
||||
switch (action.final) {
|
||||
// Charsets
|
||||
'B' => {
|
||||
// TODO: Charset support. Just ignore this for now because
|
||||
// every application sets this and it makes our logs SO
|
||||
// noisy.
|
||||
},
|
||||
|
||||
// DECSC - Save Cursor
|
||||
'7' => if (@hasDecl(T, "saveCursor")) switch (action.intermediates.len) {
|
||||
0 => try self.handler.saveCursor(),
|
||||
|
||||
Reference in New Issue
Block a user