mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
terminal: ED handles invalid values
This commit is contained in:
@ -294,7 +294,10 @@ pub fn Stream(comptime Handler: type) type {
|
||||
|
||||
const mode_: ?csi.EraseDisplay = switch (action.params.len) {
|
||||
0 => .below,
|
||||
1 => if (action.params[0] <= 3) @enumFromInt(action.params[0]) else null,
|
||||
1 => if (action.params[0] <= 3)
|
||||
std.meta.intToEnum(csi.EraseDisplay, action.params[0]) catch null
|
||||
else
|
||||
null,
|
||||
else => null,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user