feat(terminal): port Terminal, read-only stream handler and StringMap
Ports ZIG/src/terminal/Terminal.zig - printing with grapheme clustering and Unicode widths, wraparound, insert mode, charsets, cursor movement, scroll regions and left/right margins, erase/insert/delete, tabs, modes, alternate screens, save/restore cursor, DECALN, full reset, palette, mouse/focus/paste flags, kitty keyboard, titles/pwd, semantic prompts, hyperlinks, protected mode, synchronized output and resize. stream_readonly.rs implements ghostty_vt::stream::Handler, applying all state-changing actions to a Terminal and ignoring queries; it is the base for termio's side-effecting handler. StringMap uses the onig crate for Oniguruma-compatible regexes (needed by Ghostty's URL regex). Not yet wired: kitty graphics (hooks and dirty flags are in place where Zig calls into it, storage is being ported separately) and the tmux control-mode viewer. Test Plan: - cargo test -p ghostty-terminal (849 passed, 5 ignored; all 372 Terminal and 33 stream_readonly tests ported; ignored ones are blocked on the PageList parity pass)
This commit is contained in:
1 parent
0b31fd81e8
commit
0e8878cf93
16 files changed
+11178
-8
No files matched your search
@@ -361,14 +361,7 @@ pub enum SemanticContentSet {
|
||||
Input(InputClear),
|
||||
}
|
||||
|
||||
/// A string and a map from each byte of the string to the pin it came from.
|
||||
///
|
||||
/// TODO(integration): replace with `string_map::StringMap` once ported.
|
||||
#[derive(Debug, Clone, Default, PartialEq, Eq)]
|
||||
pub struct StringMap {
|
||||
pub string: String,
|
||||
pub map: Vec<Pin>,
|
||||
}
|
||||
pub use crate::string_map::StringMap;
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct SelectionString {
|
||||
|
||||
Reference in new issue
Block a user