smaller cursor corner radius

This commit is contained in:
Gregor Lohaus
2026-09-09 11:41:06 +02:00
parent d74b0acc83
commit c5e4e5fb85
5 changed files with 60 additions and 4 deletions
+23
View File
@@ -28,6 +28,29 @@ fn key(key: Key, modifiers: Modifiers) -> Event {
}
}
#[test]
fn cursor_defaults_to_hollow_and_respects_application_styles() {
use libghostty_vt::{RenderState, render::CursorVisualStyle};
let mut term = pane::terminal(&Config::default(), &theme::DEFAULT).unwrap();
let mut state = RenderState::new().unwrap();
let snapshot = state.update(&term).unwrap();
assert_eq!(
snapshot.cursor_visual_style().unwrap(),
CursorVisualStyle::BlockHollow
);
for (sequence, expected) in [
(b"\x1b[2 q", CursorVisualStyle::Block),
(b"\x1b[4 q", CursorVisualStyle::Underline),
(b"\x1b[6 q", CursorVisualStyle::Bar),
(b"\x1b[0 q", CursorVisualStyle::BlockHollow),
] {
term.vt_write(sequence);
let snapshot = state.update(&term).unwrap();
assert_eq!(snapshot.cursor_visual_style().unwrap(), expected);
}
}
#[test]
fn terminal_preserves_unicode_colors_and_application_input_modes() {
let mut term = pane::terminal(&Config::default(), &theme::DEFAULT).unwrap();