renderer: implement underline cursor

This commit is contained in:
Mitchell Hashimoto
2023-09-10 22:05:47 -07:00
parent 24af24a086
commit 10989ae7b0
3 changed files with 4 additions and 1 deletions

View File

@ -1423,6 +1423,7 @@ fn addCursor(
.block => .cursor_rect,
.block_hollow => .cursor_hollow_rect,
.bar => .cursor_bar,
.underline => .underline,
};
const glyph = self.font_group.renderGlyph(

View File

@ -1024,6 +1024,7 @@ fn addCursor(
.block => .cursor_rect,
.block_hollow => .cursor_hollow_rect,
.bar => .cursor_bar,
.underline => .underline,
};
const glyph = self.font_group.renderGlyph(

View File

@ -9,13 +9,14 @@ pub const CursorStyle = enum {
block,
block_hollow,
bar,
underline,
/// Create a cursor style from the terminal style request.
pub fn fromTerminal(style: terminal.Cursor.Style) ?CursorStyle {
return switch (style) {
.bar => .bar,
.block => .block,
.underline => null, // TODO
.underline => .underline,
};
}
};