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

Guard against snippet position groups with undefined (-1) offsets. #3352

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

rgrunber
Copy link
Contributor

@rgrunber rgrunber commented Dec 30, 2024

@hopehadfield , if you're interested, it'd be good to know if you agree that this would have always been an issue (I did notice the exact same quick-fix has the exact same problem in Eclipse). I could have sworn there was a case where we discussed how to translate to relative offsets within the edit, but can't really see where we do that. Maybe when we considered splitting up the edits so it wasn't just one giant thing ?

Either way, the issue here is that we want to sync up 2 or more positions inside the actual edit, but we can't because the edit hasn't been applied so there wouldn't be an offset in the sources.

- A linked correction proposal group may refer to positions whose offset
  cannot be resolved
- Add testcase

Signed-off-by: Roland Grunberg <[email protected]>
@rgrunber rgrunber added this to the End January 2025 milestone Dec 30, 2024
@rgrunber rgrunber merged commit 0eef634 into eclipse-jdtls:master Dec 31, 2024
7 checks passed
@rgrunber rgrunber deleted the fix-3905 branch December 31, 2024 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant