Skip to content

Fix overlapping edits in postfix completions - #3861

Open
tartarughina wants to merge 1 commit into
eclipse-jdtls:mainfrom
tartarughina:tartarughina/postfix-completion-overlap
Open

Fix overlapping edits in postfix completions#3861
tartarughina wants to merge 1 commit into
eclipse-jdtls:mainfrom
tartarughina:tartarughina/postfix-completion-overlap

Conversation

@tartarughina

Copy link
Copy Markdown
Contributor

Postfix completions now replace the complete expression with one primary textEdit. Independent context edits, such as imports, remain in additionalTextEdits.

This conforms to the LSP specification, which prohibits overlapping completion edits.

Tests cover resolution, item defaults, and edit overlap.

Addresses zed-extensions/java#295, which includes the original investigation and reproduction.

Replace the complete postfix expression with one primary text edit.
Keep independent context edits, such as imports, in additionalTextEdits
so completion edits conform to the LSP contract.

Update postfix tests for resolution, item defaults, and edit overlap.

Signed-off-by: Riccardo Strina <riccardo.strina@icloud.com>
@tartarughina
tartarughina force-pushed the tartarughina/postfix-completion-overlap branch from 2c5a8c4 to 079a845 Compare August 6, 2026 21:32
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.

1 participant