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

Fix some issues with suggestions #437

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Fix some issues with suggestions #437

wants to merge 4 commits into from

Conversation

mcy
Copy link
Member

@mcy mcy commented Jan 29, 2025

I discovered a few bugs in the suggestions rendering logic, which I've fixed in this PR. I've also included a reproducer test.

  1. There were cases where multiple edits in one suggestion could cause the renderer to index out of bounds.
  2. There were cases where, in multiline mode, extra newline would appear, because newlines ended up at the start or end of a hunk boundary.

@mcy mcy force-pushed the mcy/suggestions-fix branch from a8fe279 to d414f97 Compare January 29, 2025 20:20
@mcy mcy requested a review from jhump January 29, 2025 20:27
mcy added a commit that referenced this pull request Jan 29, 2025
Copy link
Member

@jhump jhump left a comment

Choose a reason for hiding this comment

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

This seems to be largely, but not entirely, overlapping with changes in #431.

It's confusing to review since some of it I've already looked at. If it's not possible to cleanly separate the two, then please either hold off on one branch until the other is merged or set the base branch of one PR to point to the other (so it shows a diff from the other pending change).

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.

2 participants