simondotm / beeb-vsc

Visual Studio Code Extension to support code development for BBC Micro
https://marketplace.visualstudio.com/items?itemName=simondotm.beeb-vsc
MIT License
13 stars 3 forks source link

Rename after find all references for a symbol fails #112

Closed tommy9 closed 6 months ago

tommy9 commented 6 months ago

Renaming works for labels and symbols generally. However, if you do the Find All References command on a symbol/label and then try to rename it, then it fails due to 'duplicate edits'.

The bug is in the onReferences function, as get all the references and then push the location of the definition itself to the list for returning to VSCode. This mutates the list of references in the symbol table, eventually causing issues when the references should not include the definition itself.