mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
Config: cursor-style can bet set to block_hollow
`cursor-style` can now also be set to `block_hollow`, no other changes in behaviour are added.
This commit is contained in:
@ -325,6 +325,7 @@ palette: Palette = .{},
|
|||||||
/// * `block`
|
/// * `block`
|
||||||
/// * `bar`
|
/// * `bar`
|
||||||
/// * `underline`
|
/// * `underline`
|
||||||
|
/// * `block_hollow`
|
||||||
///
|
///
|
||||||
@"cursor-style": terminal.CursorStyle = .block,
|
@"cursor-style": terminal.CursorStyle = .block,
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ pub const CursorStyle = enum {
|
|||||||
return switch (style) {
|
return switch (style) {
|
||||||
.bar => .bar,
|
.bar => .bar,
|
||||||
.block => .block,
|
.block => .block,
|
||||||
|
.block_hollow => .block_hollow,
|
||||||
.underline => .underline,
|
.underline => .underline,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ pub const Cursor = struct {
|
|||||||
/// The visual style of the cursor. Whether or not it blinks
|
/// The visual style of the cursor. Whether or not it blinks
|
||||||
/// is determined by mode 12 (modes.zig). This mode is synchronized
|
/// is determined by mode 12 (modes.zig). This mode is synchronized
|
||||||
/// with CSI q, the same as xterm.
|
/// with CSI q, the same as xterm.
|
||||||
pub const CursorStyle = enum { bar, block, underline };
|
pub const CursorStyle = enum { bar, block, underline, block_hollow };
|
||||||
|
|
||||||
/// Saved cursor state.
|
/// Saved cursor state.
|
||||||
pub const SavedCursor = struct {
|
pub const SavedCursor = struct {
|
||||||
|
@ -208,6 +208,7 @@ pub const StreamHandler = struct {
|
|||||||
const blink = self.terminal.modes.get(.cursor_blinking);
|
const blink = self.terminal.modes.get(.cursor_blinking);
|
||||||
const style: u8 = switch (self.terminal.screen.cursor.cursor_style) {
|
const style: u8 = switch (self.terminal.screen.cursor.cursor_style) {
|
||||||
.block => if (blink) 1 else 2,
|
.block => if (blink) 1 else 2,
|
||||||
|
.block_hollow => if (blink) 1 else 2,
|
||||||
.underline => if (blink) 3 else 4,
|
.underline => if (blink) 3 else 4,
|
||||||
.bar => if (blink) 5 else 6,
|
.bar => if (blink) 5 else 6,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user