fix: Fix incorrectly replacing references in macro invocation in "Convert to named struct" assist

This commit is contained in:
Jinoh Kang 2023-11-14 15:41:39 +09:00
parent 416e9c856a
commit 0beba7cfc4

View file

@ -216,7 +216,7 @@ fn edit_field_references(
edit.edit_file(file_id);
for r in refs {
if let Some(name_ref) = r.name.as_name_ref() {
edit.replace(name_ref.syntax().text_range(), name.text());
edit.replace(ctx.sema.original_range(name_ref.syntax()).range, name.text());
}
}
}