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

Edit: Only compute diffs for actual edits #3424

Merged
merged 3 commits into from Mar 15, 2024
Merged

Conversation

umpox
Copy link
Contributor

@umpox umpox commented Mar 15, 2024

Description

We currently try to compute the diff for all Edits, regardless if they are editing existing code or inserting new code.

Trying to produce a diff for inserting code is weird, because we actually don't care about the users' selection, but we still use it to compute the diff.

This can lead to a very misleading animation as the Edit computes, and it's also inefficient as we just throw the diff away anyway

Test plan

  1. Make an edit, check functions as normal
  2. Make an edit that only inserts new code (e.g. document, or add), check functions as normal

@umpox umpox requested review from a team March 15, 2024 16:36
@umpox umpox enabled auto-merge (squash) March 15, 2024 16:46
@umpox umpox merged commit 3891e30 into main Mar 15, 2024
15 checks passed
@umpox umpox deleted the tr/edit-diff-only-edits branch March 15, 2024 16:48
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.

None yet

3 participants