aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/terminal/cursor.zig
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/terminal/cursor.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/terminal/cursor.zig')
-rw-r--r--vendor/libghostty-vt/src/terminal/cursor.zig34
1 files changed, 22 insertions, 12 deletions
diff --git a/vendor/libghostty-vt/src/terminal/cursor.zig b/vendor/libghostty-vt/src/terminal/cursor.zig
index 136ee085..f5f66075 100644
--- a/vendor/libghostty-vt/src/terminal/cursor.zig
+++ b/vendor/libghostty-vt/src/terminal/cursor.zig
@@ -1,15 +1,25 @@
+const lib = @import("../lib/main.zig");
+
/// The visual style of the cursor. Whether or not it blinks
/// is determined by mode 12 (modes.zig). This mode is synchronized
/// with CSI q, the same as xterm.
-pub const Style = enum {
- bar, // DECSCUSR 5, 6
- block, // DECSCUSR 1, 2
- underline, // DECSCUSR 3, 4
-
- /// The cursor styles below aren't known by DESCUSR and are custom
- /// implemented in Ghostty. They are reported as some standard style
- /// if requested, though.
- /// Hollow block cursor. This is a block cursor with the center empty.
- /// Reported as DECSCUSR 1 or 2 (block).
- block_hollow,
-};
+///
+/// Bar, block, and underline correspond to DECSCUSR 5/6, 1/2, and 3/4.
+/// Hollow block is Ghostty-specific and is reported as DECSCUSR 1 or 2.
+pub const Style = lib.Enum(.zig, &.{
+ // DECSCUSR 5, 6
+ "bar",
+
+ // DECSCUSR 1, 2
+ "block",
+
+ // DECSCUSR 3, 4
+ "underline",
+
+ // The cursor styles below aren't known by DESCUSR and are custom
+ // implemented in Ghostty. They are reported as some standard style
+ // if requested, though.
+ // Hollow block cursor. This is a block cursor with the center empty.
+ // Reported as DECSCUSR 1 or 2 (block).
+ "block_hollow",
+});