diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-04-04 19:22:04 +0300 |
|---|---|---|
| committer | Can Celik <ogulcancelik@gmail.com> | 2026-04-05 01:23:06 +0300 |
| commit | 41dd733ca7123c9ac4bfc6c781697a660e95b052 (patch) | |
| tree | 3fc91815ca139ef2e0b281bba0abda4ef15175f4 /vendor/libghostty-vt/src/terminal/csi.zig | |
| parent | 55c138263e190a1e79d4b997bfb9397306c0ec1f (diff) | |
feat: finish ghostty pane backend integration
Diffstat (limited to 'vendor/libghostty-vt/src/terminal/csi.zig')
| -rw-r--r-- | vendor/libghostty-vt/src/terminal/csi.zig | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/src/terminal/csi.zig b/vendor/libghostty-vt/src/terminal/csi.zig new file mode 100644 index 00000000..2491a234 --- /dev/null +++ b/vendor/libghostty-vt/src/terminal/csi.zig @@ -0,0 +1,55 @@ +const lib = @import("lib.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 = lib.Enum( + lib.target, + &.{ + // 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 }; +}; |
