mirror of
https://github.com/Darkrock-Studios/hammer-editor.git
synced 2026-08-04 15:19:46 +00:00
New ProseDiff module: word-level Myers diff (kotlin-multiplatform-diff) over markdown text, with syntax stripped via the JetBrains parser and offsets mapped back to source. Merges adjacent edits into single hunks, emits anchors at each boundary for scroll sync, and includes a git-style slider that aligns pure insert/delete blocks to line boundaries. Covers plain-text diffing, prepared/reusable inputs, and an OffsetMap that maps a position on one side to its counterpart. Draft compare: highlights DELETED (red/strikethrough) and INSERTED (green/underline) spans via non-destructive RichSpans in each pane's rendered coordinate space, recomputed off-thread on a 500ms debounce. Synchronized scrolling (compose-texteditor 2.0.7) drives either pane from the other off raw scroll pixels with an echo guard. Both editor states are hoisted so highlights and sync work in compact and expanded layouts and survive theme changes. A DIFF toggle gates highlights and sync. |
||
|---|---|---|
| .. | ||
| src | ||
| build.gradle.kts | ||