Expand description
Diff-mode subsystem: engine (pure line + word diff), hunk (data types),
state::DiffState (session state owned by EditorState::diff while Mode::Diff is
active), and layout (the stacked visual-line model shared by renderer and scroll math).
See docs/dev/diff-review.md.
Re-exports§
pub use engine::compute;pub use engine::HunkIdAllocator;pub use hunk::Decision;pub use hunk::Hunk;pub use hunk::HunkId;pub use hunk::HunkKind;pub use hunk::InlineSide;pub use hunk::InlineSpan;pub use layout::DiffLineSource;pub use layout::DiffVisualLine;pub use state::DiffState;pub use state::ReconcileOutcome;
Modules§
- engine
- Line-level + inline-word diff over two strings, producing the
Hunksequence consumed bycrate::diff::DiffState. Wrapssimilar::TextDiff::from_linesso nothing else importssimilardirectly, and adds two things on top: - hunk
- Hunk types for the diff subsystem. Line ranges are half-open
[start, end); anInserthas an emptyold_lines, aDeletean emptynew_lines. - layout
- Visual-line model and layout cache for the diff view.
- state
DiffState— the in-flight review session attached toEditorState::diffwhileMode::Diffis active. Owns the pre-change rope, the working new-side buffer, the hunk list, per-hunk decisions, and focus. Seedocs/dev/diff-review.md.