diffs.nvim/lua/diffs
Barrett Ruth 2ab17a05d8 fix: carry forward highlighted hunks on reparse to reduce flicker
Problem: toggling large diffs via fugitive's `=` caused the top of the
buffer to re-render and glitch. ensure_cache always created a new cache
entry with pending_clear=true and highlighted={}, forcing on_win to
clear and re-highlight every visible hunk — including stable ones above
the toggle point that never changed.

Solution: on reparse, compare old and new hunk lists using a prefix +
suffix matching strategy. Hunks that match (same filename, line count,
and sampled content) carry forward their highlighted state so on_win
skips them. Comparison is O(1) per hunk. Only runs when old entry had
pending_clear=false; invalidate_cache/ColorScheme paths still force
full re-highlight.

Closes #131
2026-02-25 12:40:40 -05:00
..
commands.lua feat: unified diff conflict resolution for unmerged files (#99) 2026-02-09 12:21:13 -05:00
conflict.lua fix: pre-release cleanup for v0.2.0 (#102) 2026-02-09 15:08:36 -05:00
debug.lua fix(debug): resolve sparse array crash in json dump 2026-02-07 00:50:02 -05:00
diff.lua fix(diff): strip linematch from char-level diff 2026-02-07 00:50:08 -05:00
fugitive.lua fix: pre-release cleanup for v0.2.0 (#102) 2026-02-09 15:08:36 -05:00
git.lua perf: cache repo root and harden async paths (#100) 2026-02-09 12:39:13 -05:00
health.lua feat(highlight): add character-level intra-line diff highlighting 2026-02-06 13:53:58 -05:00
highlight.lua fix(highlight): revert line backgrounds to hl_group+hl_eol (#124) 2026-02-15 18:27:39 -05:00
init.lua fix: carry forward highlighted hunks on reparse to reduce flicker 2026-02-25 12:40:40 -05:00
lib.lua perf: cache repo root and harden async paths (#100) 2026-02-09 12:39:13 -05:00
log.lua performance improvements (#116) 2026-02-12 16:59:13 -05:00
merge.lua fix: pre-release cleanup for v0.2.0 (#102) 2026-02-09 15:08:36 -05:00
parser.lua feat(neogit): use new neogit apis for highlight and repo root (#133) 2026-02-25 11:42:59 -05:00