fix(lsp): consolidate range_overlaps into shared utils#3
Merged
wagenet merged 4 commits intofix-autofixfrom Feb 27, 2026
Merged
fix(lsp): consolidate range_overlaps into shared utils#3wagenet merged 4 commits intofix-autofixfrom
wagenet merged 4 commits intofix-autofixfrom
Conversation
Co-authored-by: wagenet <9835+wagenet@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix issues called out in PR #19793
fix(lsp): add unit tests for fix_all_text_edit overlap detection
Feb 27, 2026
|
Hi! I'm the It looks like you correctly set up a CI job that uses the autofix.ci GitHub Action, but the autofix.ci GitHub App has not been installed for this repository. This means that autofix.ci unfortunately does not have the permissions to fix this pull request. If you are the repository owner, please install the app and then restart the CI workflow! 😃 |
Co-authored-by: wagenet <9835+wagenet@users.noreply.github.com>
Copilot
AI
changed the title
fix(lsp): add unit tests for fix_all_text_edit overlap detection
fix(lsp): reuse shared range_overlaps utility in fix_all_text_edit
Feb 27, 2026
Co-authored-by: wagenet <9835+wagenet@users.noreply.github.com>
Copilot
AI
changed the title
fix(lsp): reuse shared range_overlaps utility in fix_all_text_edit
fix(lsp): consolidate range_overlaps into shared utils
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
range_overlapswas defined locally inserver_linter.rswhilecode_actions.rshad an equivalent inline check. This consolidates both into a single sharedpub(super) fn range_overlapsinutils.rs.Changes
utils.rs: Addedpub(super) fn range_overlaps(a: Range, b: Range) -> bool(non-strict<=/>=, so touching ranges are treated as overlapping)server_linter.rs: Removed local definition; imports fromutilscode_actions.rs: Replaced 4-line inline check withrange_overlaps; collapsed nestedif let/ifinto a let-chain to satisfyclippy::collapsible_ifThe
fix_all_text_editbehavior changes slightly: adjacent edits sharing a boundary point are now conservatively dropped (previously kept). This is safe — the deferred fix applies on the next "fix all" invocation.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.