Skip to content

Gln/diff alignment fixes ouvv#340

Merged
glehmann merged 2 commits into
mainfrom
gln/diff-alignment-fixes-ouvv
Jul 9, 2026
Merged

Gln/diff alignment fixes ouvv#340
glehmann merged 2 commits into
mainfrom
gln/diff-alignment-fixes-ouvv

Conversation

@glehmann

@glehmann glehmann commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

glehmann added 2 commits July 9, 2026 10:40
…icts

Dotted blue line indicators in the diff gutter were showing at
stale line numbers when viewing a different commit, because the
lookup used raw comment.line values from the store instead of
the re-anchored positions computed by resolveCommentLineFromDiffHunk.

Also fixed React warnings about mixing background shorthand with
individual background-* properties, and added a missing useMemo
dependency to prevent stale inline-change highlighting.
When two candidate inserts have nearly identical content-change ratios
(within 0.05), prefer the one closer in the changes array. This prevents
semantically-different lines like `def top_append` from pairing with
`def top_setattr` across the hunk, when the correct same-function
neighbor exists at a similar ratio.

Also fix detectAndUnpairCrossings to sort pairs by newLineNumber and
check old-line-number inversions, matching the visual emitLines order
so the correct pair is unpaired in crossing scenarios.
@glehmann glehmann force-pushed the gln/diff-alignment-fixes-ouvv branch from dafd445 to 5a240ca Compare July 9, 2026 08:40
@glehmann glehmann merged commit 5a240ca into main Jul 9, 2026
6 checks passed
@glehmann glehmann deleted the gln/diff-alignment-fixes-ouvv branch July 9, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant