mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
renderer: implement underline cursor
This commit is contained in:
@ -1423,6 +1423,7 @@ fn addCursor(
|
|||||||
.block => .cursor_rect,
|
.block => .cursor_rect,
|
||||||
.block_hollow => .cursor_hollow_rect,
|
.block_hollow => .cursor_hollow_rect,
|
||||||
.bar => .cursor_bar,
|
.bar => .cursor_bar,
|
||||||
|
.underline => .underline,
|
||||||
};
|
};
|
||||||
|
|
||||||
const glyph = self.font_group.renderGlyph(
|
const glyph = self.font_group.renderGlyph(
|
||||||
|
@ -1024,6 +1024,7 @@ fn addCursor(
|
|||||||
.block => .cursor_rect,
|
.block => .cursor_rect,
|
||||||
.block_hollow => .cursor_hollow_rect,
|
.block_hollow => .cursor_hollow_rect,
|
||||||
.bar => .cursor_bar,
|
.bar => .cursor_bar,
|
||||||
|
.underline => .underline,
|
||||||
};
|
};
|
||||||
|
|
||||||
const glyph = self.font_group.renderGlyph(
|
const glyph = self.font_group.renderGlyph(
|
||||||
|
@ -9,13 +9,14 @@ pub const CursorStyle = enum {
|
|||||||
block,
|
block,
|
||||||
block_hollow,
|
block_hollow,
|
||||||
bar,
|
bar,
|
||||||
|
underline,
|
||||||
|
|
||||||
/// Create a cursor style from the terminal style request.
|
/// Create a cursor style from the terminal style request.
|
||||||
pub fn fromTerminal(style: terminal.Cursor.Style) ?CursorStyle {
|
pub fn fromTerminal(style: terminal.Cursor.Style) ?CursorStyle {
|
||||||
return switch (style) {
|
return switch (style) {
|
||||||
.bar => .bar,
|
.bar => .bar,
|
||||||
.block => .block,
|
.block => .block,
|
||||||
.underline => null, // TODO
|
.underline => .underline,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user