mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
terminal: ignore invalid C0 escape codes
This commit is contained in:
@ -23,6 +23,10 @@ pub const C0 = enum(u7) {
|
|||||||
SO = 0x0E,
|
SO = 0x0E,
|
||||||
/// Shift in
|
/// Shift in
|
||||||
SI = 0x0F,
|
SI = 0x0F,
|
||||||
|
|
||||||
|
// Non-exhaustive so that @intToEnum never fails since the inputs are
|
||||||
|
// user-generated.
|
||||||
|
_,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// The SGR rendition aspects that can be set, sometimes known as attributes.
|
/// The SGR rendition aspects that can be set, sometimes known as attributes.
|
||||||
|
@ -73,7 +73,6 @@ pub fn Stream(comptime Handler: type) type {
|
|||||||
tracy.value(@intCast(u64, c));
|
tracy.value(@intCast(u64, c));
|
||||||
defer tracy.end();
|
defer tracy.end();
|
||||||
|
|
||||||
// log.warn("C0: {}", .{c});
|
|
||||||
switch (@intToEnum(ansi.C0, c)) {
|
switch (@intToEnum(ansi.C0, c)) {
|
||||||
.NUL => {},
|
.NUL => {},
|
||||||
|
|
||||||
@ -122,6 +121,8 @@ pub fn Stream(comptime Handler: type) type {
|
|||||||
try self.handler.invokeCharset(.GL, .G0, false)
|
try self.handler.invokeCharset(.GL, .G0, false)
|
||||||
else
|
else
|
||||||
log.warn("unimplemented invokeCharset: {x}", .{c}),
|
log.warn("unimplemented invokeCharset: {x}", .{c}),
|
||||||
|
|
||||||
|
else => log.warn("invalid C0 character, ignoring: {x}", .{c}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user