ghostty/src/terminal/csi.zig
Mitchell Hashimoto 039f9231de terminal: parse CSI 22/23 for push/pop title
Related to #2668

This just implements the VT stream parsing. The actual handling of these
events still needs to be done.
2024-11-13 19:49:45 -08:00

51 lines
1.0 KiB
Zig

/// Modes for the ED CSI command.
pub const EraseDisplay = enum(u8) {
below = 0,
above = 1,
complete = 2,
scrollback = 3,
/// This is an extension added by Kitty to move the viewport into the
/// scrollback and then erase the display.
scroll_complete = 22,
};
/// Modes for the EL CSI command.
pub const EraseLine = enum(u8) {
right = 0,
left = 1,
complete = 2,
right_unless_pending_wrap = 4,
// Non-exhaustive so that @intToEnum never fails since the inputs are
// user-generated.
_,
};
/// Modes for the TBC (tab clear) command.
pub const TabClear = enum(u8) {
current = 0,
all = 3,
// Non-exhaustive so that @intToEnum never fails since the inputs are
// user-generated.
_,
};
/// Style formats for terminal size reports.
pub const SizeReportStyle = enum {
// XTWINOPS
csi_14_t,
csi_16_t,
csi_18_t,
csi_21_t,
};
/// XTWINOPS CSI 22/23
pub const TitlePushPop = struct {
op: Op,
index: u16,
pub const Op = enum { push, pop };
};