fix: Windows core build, embedded init, byte-exact paths, version info
Closes the remaining core/lib/termio/GTK rows (final-Z2.md): - ghostty-core compiles for Windows (Unix-only exec fields and file modes gated); checked with cargo check --target x86_64-pc-windows-gnu. - Embedded init: ensure_locale, SIGPIPE ignored in ghostty_init for C/Swift hosts, Apple crash tags; the argv passed to ghostty_init feeds ghostty_config_load_cli_args; ghostty_config_load_file accepts non-UTF-8 paths. - OSC 7 pwd, embedded surface cwd/command/env/initial input, ghostty_surface_text and GTK file drops keep raw bytes. - XTVERSION, TERM_PROGRAM_VERSION, the About dialog and crash metadata use ghostty_build_info instead of hardcoded versions. Test Plan: - cargo test --workspace (3327 passed) - cargo clippy --workspace --all-targets -- -D warnings
This commit is contained in:
1 parent
395cff8981
commit
a9f3856b15
30 files changed
+863
-80
No files matched your search
@@ -649,6 +649,11 @@ impl std::fmt::Display for SetTitle {
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Pwd {
|
||||
/// The working directory as reported by OSC 7. Zig keeps raw bytes; here
|
||||
/// non-UTF-8 bytes are carried with the reversible escape of
|
||||
/// `ghostty_os::osbytes` (valid UTF-8 is unchanged). Decode with
|
||||
/// `osbytes::config_str_to_bytes` / `config_str_to_os` before using it
|
||||
/// as a path or handing it to C.
|
||||
pub pwd: String,
|
||||
}
|
||||
|
||||
|
||||
@@ -201,6 +201,15 @@ pub trait CoreSurface {
|
||||
data: &str,
|
||||
confirmed: bool,
|
||||
) -> Result<(), ClipboardError>;
|
||||
/// [`CoreSurface::complete_clipboard_request`] for a paste of raw bytes
|
||||
/// (Zig data is `[]const u8`). The default converts lossily.
|
||||
fn complete_paste_bytes(&self, data: &[u8], confirmed: bool) -> Result<(), ClipboardError> {
|
||||
self.complete_clipboard_request(
|
||||
ClipboardRequest::Paste,
|
||||
&String::from_utf8_lossy(data),
|
||||
confirmed,
|
||||
)
|
||||
}
|
||||
/// After the user confirms (`surface.config.clipboard_read = .allow`).
|
||||
fn set_clipboard_read_allowed(&self, allow: bool);
|
||||
/// See [`CoreSurface::set_clipboard_read_allowed`] (`clipboard_write`).
|
||||
|
||||
Reference in new issue
Block a user