Skip to content

fix(code-actions): reject cross-line destruct recovery - #2063

Open
rgrinberg wants to merge 1 commit into
masterfrom
push-yxmptsysytku
Open

fix(code-actions): reject cross-line destruct recovery#2063
rgrinberg wants to merge 1 commit into
masterfrom
push-yxmptsysytku

Conversation

@rgrinberg

Copy link
Copy Markdown
Member

Destruct-line computes preprocessing offsets relative to the queried source line. Applying those offsets to a Merlin recovery location beginning on another line can move the edit endpoint into the middle of a UTF-8 scalar and can also target unrelated source.

Allow destruct post-processing to reject unusable replies and return no destruct-line action when either recovered endpoint escapes the query line.

Destruct-line offsets are relative to the queried line. Decline Merlin replies whose replacement location escapes that line instead of shifting an unrelated source position.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg
rgrinberg force-pushed the push-yxmptsysytku branch from ca612f0 to ac76305 Compare July 31, 2026 23:18
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