mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Add support for adjusting thickness of underline cursor
Signed-off-by: Aaron Ruan <i@ar212.com>
This commit is contained in:
@ -32,6 +32,7 @@ pub const Sprite = enum(u32) {
|
||||
cursor_rect,
|
||||
cursor_hollow_rect,
|
||||
cursor_bar,
|
||||
cursor_underline,
|
||||
|
||||
// Note: we don't currently put the box drawing glyphs in here because
|
||||
// there are a LOT and I'm lazy. What I want to do is spend more time
|
||||
|
@ -174,6 +174,7 @@ const Kind = enum {
|
||||
.cursor_rect,
|
||||
.cursor_hollow_rect,
|
||||
.cursor_bar,
|
||||
.cursor_underline,
|
||||
=> .cursor,
|
||||
},
|
||||
|
||||
|
@ -43,6 +43,12 @@ pub fn renderGlyph(
|
||||
.width = thickness,
|
||||
.height = height,
|
||||
}, .on),
|
||||
Sprite.cursor_underline => canvas.rect(.{
|
||||
.x = 0,
|
||||
.y = height -| thickness,
|
||||
.width = width,
|
||||
.height = thickness,
|
||||
}, .on),
|
||||
else => unreachable,
|
||||
}
|
||||
|
||||
|
@ -2868,7 +2868,7 @@ pub fn Renderer(comptime GraphicsAPI: type) type {
|
||||
.block => .cursor_rect,
|
||||
.block_hollow => .cursor_hollow_rect,
|
||||
.bar => .cursor_bar,
|
||||
.underline => .underline,
|
||||
.underline => .cursor_underline,
|
||||
.lock => unreachable,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user