VS Code renaming prop bound using same-name shorthand #5017
Labels
bug
Something isn't working
good reproduction ✨
This issue provides a good reproduction, we will be able to investigate it first
🔨 p3-minor-bug
Vue - Official extension or vue-tsc version
2.1.10
VSCode version
1.95.3
Vue version
3.5.13
TypeScript version
5.6.3
System Info
No response
package.json dependencies
No response
Steps to reproduce
Bind a variable to the prop of a vue component using the same-name shorthand introduced in vue 3.4. E.g.:
Now rename the ref using the tools built in to VS Code (shortcut: F2)
What is expected?
I'd expect that renaming the variable bound to the prop would revert to using the normal v-bind syntax so the binding still works like before, just with a new variable name. E.g.:
What is actually happening?
At the moment the shorthand is renamed even though due to the name change it's no longer valid. E.g.:
Link to minimal reproduction
No response
Any additional comments?
I don't think this should happen as it makes the rename functionality built into VS Code non reliable. Renaming a variable bound using the shorthand would break, or even worse, accidentially bind the value to a different prop.
The text was updated successfully, but these errors were encountered: