fix: close remaining gaps found by the completeness audit
Addresses the partial ports listed in docs/rewrite/notes/review-completeness-codex.md (details in docs/rewrite/notes/gaps-X2.md): - Flatpak: the exit watcher no longer consumes the host command; a shared FlatpakSignalHandle lets closing a surface still SIGHUP the host process group. - Child environment is byte-preserving end to end (ghostty_os::EnvMap of OsStrings) and Snap paths are filtered like filterSnapPaths. - argv handling no longer panics on non-UTF-8 arguments. - URI percent-decoding keeps raw bytes; OSC 7 pwd is passed through without lossy conversion. - Keybinding comparison/hashing uses full Unicode case folding from a table generated from CaseFolding.txt (Unicode 17.0.0). - Link regexes set Oniguruma's whole-search retry limit through the new minimal ghostty-onig crate (one SAFETY-commented FFI call). - OSC 9 NUL-capacity check ordering matches Zig. - Wayland registry binds/clears globals advertised after startup. - Custom shaders may pass sampler2D to helper functions (naga adapter). - +list-themes preview renders OSC 8 links, styled underlines and follows color-scheme reports. Also includes the inspector's integration edits in shared files (renderer state hook, termio VT recording, core/apprt-gtk wiring), X1's config/input/cli additions for completion generation, and a fix for a race in the termio backpressure test (it wrote before `stty raw` applied, so the cooked line discipline dropped bytes past MAX_CANON). Test Plan: - cargo test --workspace - cargo clippy --workspace --all-targets -- -D warnings
This commit is contained in:
1 parent
90ad602969
commit
f4c020101c
61 files changed
+4210
-298
No files matched your search
@@ -22,11 +22,11 @@ pub struct State {
|
||||
/// The terminal data.
|
||||
pub terminal: Terminal,
|
||||
|
||||
/// The overlay features currently requested by the terminal inspector
|
||||
/// (Zig: `inspector: ?*Inspector` and `inspector.rendererInfo()
|
||||
/// .overlayFeatures()`). Empty while the inspector is not active.
|
||||
// TODO(integration): the inspector is deferred (Phase 7); it fills this.
|
||||
pub overlay_features: Vec<OverlayFeature>,
|
||||
/// The terminal inspector, if any (Zig: `inspector: ?*Inspector`). This
|
||||
/// is `None` while the inspector is not active. It is accessed under the
|
||||
/// same lock as the terminal (lock order: this state, then the
|
||||
/// inspector's own lock).
|
||||
pub inspector: Option<Arc<dyn InspectorHook>>,
|
||||
|
||||
/// Dead key state. This will render the current dead key preedit text
|
||||
/// over the cursor. This currently only ever renders a single codepoint.
|
||||
@@ -39,6 +39,20 @@ pub struct State {
|
||||
pub mouse: Mouse,
|
||||
}
|
||||
|
||||
/// The view of the terminal inspector that the renderer and termio need
|
||||
/// (the inspector crate itself depends on this crate, so the Zig
|
||||
/// `*Inspector` pointer is expressed as a trait object).
|
||||
pub trait InspectorHook: Send + Sync + std::fmt::Debug {
|
||||
/// The overlay features requested in the inspector's renderer window
|
||||
/// (Zig: `inspector.rendererInfo().overlayFeatures()`).
|
||||
fn overlay_features(&self) -> Vec<OverlayFeature>;
|
||||
|
||||
/// Record data read from the pty before it is processed by the terminal
|
||||
/// (Zig: `Inspector.recordPtyRead`). Termio calls this one byte at a
|
||||
/// time while an inspector is active.
|
||||
fn record_pty_read(&self, t: &Terminal, data: &[u8]);
|
||||
}
|
||||
|
||||
/// The shared, mutex-protected renderer state.
|
||||
pub type SharedState = Arc<Mutex<State>>;
|
||||
|
||||
@@ -46,7 +60,7 @@ impl State {
|
||||
pub fn new(terminal: Terminal) -> State {
|
||||
State {
|
||||
terminal,
|
||||
overlay_features: Vec::new(),
|
||||
inspector: None,
|
||||
preedit: None,
|
||||
mouse: Mouse::default(),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user