diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-04 02:14:49 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-04 02:15:23 +0300 |
| commit | 5abdae1ac7d5475e63e39681f7014acc35d36a89 (patch) | |
| tree | 5aceecb3de0f7419c31e98e9d632dc5ec86b490d /src/ghostty | |
| parent | 96c485653b5186b71fa88aace1128e50657197a5 (diff) | |
fix: restore windows recent pane reads
refs #962
Diffstat (limited to 'src/ghostty')
| -rw-r--r-- | src/ghostty/mod.rs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/ghostty/mod.rs b/src/ghostty/mod.rs index 8a909b8c..e79c9a16 100644 --- a/src/ghostty/mod.rs +++ b/src/ghostty/mod.rs @@ -2277,6 +2277,41 @@ impl<'a> RowIter<'a> { Ok(dirty) } + #[cfg(windows)] + pub fn wrap_state(&self) -> Result<(bool, bool), Error> { + let mut row = 0; + // SAFETY: row output matches requested row data type. + unsafe { + ffi::ghostty_render_state_row_get( + self.iterator.raw, + ffi::GhosttyRenderStateRowData_GHOSTTY_RENDER_STATE_ROW_DATA_RAW, + (&mut row as *mut ffi::GhosttyRow).cast(), + ) + .into_result()?; + } + let mut soft_wrapped = false; + // SAFETY: wrap output matches requested row data type. + unsafe { + ffi::ghostty_row_get( + row, + ffi::GhosttyRowData_GHOSTTY_ROW_DATA_WRAP, + (&mut soft_wrapped as *mut bool).cast(), + ) + .into_result()?; + } + let mut wrap_continuation = false; + // SAFETY: wrap continuation output matches requested row data type. + unsafe { + ffi::ghostty_row_get( + row, + ffi::GhosttyRowData_GHOSTTY_ROW_DATA_WRAP_CONTINUATION, + (&mut wrap_continuation as *mut bool).cast(), + ) + .into_result()?; + } + Ok((soft_wrapped, wrap_continuation)) + } + pub fn clear_dirty(&mut self) -> Result<(), Error> { self.set_dirty(false) } |
