Ports ZIG/src/terminal/{Screen,ScreenSet,Tabstops,Selection}.zig on top
of the page/PageList layer. The cursor holds a TrackedPin; Zig's cached
page_row/page_cell pointers become accessor methods. Selection methods
take the PageList explicitly because tracked bounds are handles.
Screen tests use minimal plain-text dump/selection-string helpers that
follow the formatter's semantics; they will delegate to the real
formatter once formatter.zig is ported.
Gaps found in the PageList layer are recorded for the parity pass in
docs/rewrite/notes/ghostty-terminal-pagelist-requests.md; three resize
tests are #[ignore]d pending those fixes (PageList::resize keeps
trailing blank rows Zig drops). Kitty image storage and StringMap are
placeholders.
Test Plan:
- cargo test -p ghostty-terminal (443 passed, 3 ignored; Screen 183/184,
Selection 18/18, Tabstops 4/5 - skipped tests use allocator failure
injection)
23 lines
721 B
Rust
23 lines
721 B
Rust
//! Cursor visual style (ZIG/src/terminal/cursor.zig).
|
|
|
|
/// The visual style of the cursor. Whether or not it blinks
|
|
/// is determined by mode 12 (modes.zig). This mode is synchronized
|
|
/// with CSI q, the same as xterm.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
|
|
pub enum Style {
|
|
/// DECSCUSR 5, 6
|
|
Bar,
|
|
/// DECSCUSR 1, 2
|
|
#[default]
|
|
Block,
|
|
/// DECSCUSR 3, 4
|
|
Underline,
|
|
|
|
/// The cursor styles below aren't known by DESCUSR and are custom
|
|
/// implemented in Ghostty. They are reported as some standard style
|
|
/// if requested, though.
|
|
/// Hollow block cursor. This is a block cursor with the center empty.
|
|
/// Reported as DECSCUSR 1 or 2 (block).
|
|
BlockHollow,
|
|
}
|