Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework diff rendering to allow putting the cursor into deleted text, soft-wrapping and scrolling deleted text correctly #22994

Draft
wants to merge 118 commits into
base: main
Choose a base branch
from

Conversation

maxbrunsfeld
Copy link
Collaborator

@maxbrunsfeld maxbrunsfeld commented Jan 11, 2025

⚠️ WIP ⚠️

Release Notes:

  • Improved diff rendering, allowing you to navigate with your cursor inside of deleted text in diff hunks.

maxbrunsfeld and others added 30 commits December 4, 2024 16:49
Correctly handle multiple edits to DiffMap

Co-authored-by: Conrad <[email protected]>
ConradIrwin and others added 29 commits January 8, 2025 14:43
collapsed.

This is a change in behaviour, but an improvement.
* Get randomized tests passing through seed=1000 w/ simple text, operations=5
* Clean up `recompute_expanded_diff_hunks`
Extract a general `lift_buffer_metadata` method, used in that method
and `diff_hunks_in_range`, that does the hard stuff.
 buffer content ] [ deleted content ] [ buffer content
 		^ ^                 ^ ^
		| |                 | - Bias::Right
		| |                 Bias::Left, diff_anchor = Some(Bias::Left)
		| Bias::Left, diff_anchor = Some(Bias::Right)
		Bias::Left, diff_base = None
To get this compiling
* rework all calls to `range_to_buffer_ranges`
* implement `excerpt_ids_for_range`
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants