Skip to content

fix(rename): keep occurrence conversion on one snapshot - #2062

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

fix(rename): keep occurrence conversion on one snapshot#2062
rgrinberg wants to merge 1 commit into
masterfrom
push-plslpusmqnnp

Conversation

@rgrinberg

Copy link
Copy Markdown
Member

Rename queried Merlin using one document snapshot but later converted the returned locations and selected document versions from the mutable store. A concurrent didChange could therefore combine old occurrence offsets with newer source and raise Invalid_argument("index out of bounds").

Snapshot all open documents before dispatching the query and use those sources and versions consistently when constructing the workspace edit.

Snapshot all open documents before querying Merlin, then use those same sources and versions to convert the returned occurrence locations.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg
rgrinberg force-pushed the push-plslpusmqnnp branch from 1665076 to 1e8bd9d 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