Skip to content

Fix some issues with suggestions#437

Merged
mcy merged 5 commits intomainfrom
mcy/suggestions-fix
Feb 3, 2025
Merged

Fix some issues with suggestions#437
mcy merged 5 commits intomainfrom
mcy/suggestions-fix

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).

@mcy mcy requested review from doriable and jhump and removed request for jhump February 3, 2025 18:17
@mcy mcy enabled auto-merge (squash) February 3, 2025 20:59
@mcy mcy merged commit df7e520 into main Feb 3, 2025
8 checks passed
@mcy mcy deleted the mcy/suggestions-fix branch February 3, 2025 21:03
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.

3 participants