mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
terminal: reject invalid DECSASD status code
This commit is contained in:
@ -91,9 +91,6 @@ pub const StatusLineType = enum(u16) {
|
||||
pub const StatusDisplay = enum(u16) {
|
||||
main = 0,
|
||||
status_line = 1,
|
||||
|
||||
// Non-exhaustive so that @intToEnum never fails for unsupported values.
|
||||
_,
|
||||
};
|
||||
|
||||
/// The possible modify key formats to ESC[>{a};{b}m
|
||||
|
@ -1212,7 +1212,12 @@ pub fn Stream(comptime Handler: type) type {
|
||||
if (!@hasDecl(T, "setActiveStatusDisplay"))
|
||||
break :decsasd false;
|
||||
|
||||
try self.handler.setActiveStatusDisplay(@enumFromInt(input.params[0]));
|
||||
const display = std.meta.intToEnum(
|
||||
ansi.StatusDisplay,
|
||||
input.params[0],
|
||||
) catch break :decsasd false;
|
||||
|
||||
try self.handler.setActiveStatusDisplay(display);
|
||||
break :decsasd true;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user