Skip to content
This repository was archived by the owner on Jun 2, 2026. It is now read-only.

Refactor and fix diff highlighting#101

Merged
andrewpareles merged 11 commits into
mainfrom
diff-selections
Oct 15, 2024
Merged

Refactor and fix diff highlighting#101
andrewpareles merged 11 commits into
mainfrom
diff-selections

Conversation

@mathewpareles

Copy link
Copy Markdown
Contributor

This pull request includes several commits that refactor and fix the diff highlighting feature. The changes include:

  1. Creating diffs using the diffArea data structure instead of just the diff data structure.

  2. Making diffs responsive on changes. Changes are handled by DisplayChangesProvider.ts, and involve creating new diffAreas and diffs, refreshing changes dynamically refreshDiffAreas, and accepting and rejecting diffs.

  3. Handling diff logic entirely in the findDiffs.ts file, instead of in both getDiffedLines.js and extension.ts.

  4. Renaming variables and functions. New names include acceptDiff, rejectDiff, and types have more uniform names including BaseDiffArea, DiffArea, BaseDiff, and Diff.

@mathewpareles mathewpareles left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes pass all tests.

@andrewpareles andrewpareles added the high priority High priority issue label Oct 15, 2024
@andrewpareles andrewpareles merged commit 68c5ebb into main Oct 15, 2024
@mathewpareles

Copy link
Copy Markdown
Contributor Author

Note that this PR solves Issue #15.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

high priority High priority issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants