Open gohierf opened 3 months ago
Sorry for the late answer, had some busy weeks...
Yes this is a bug and I will try to fix it.
At the moment I would say, dont use Spaces in Variable Name ;-)
About your additional context:
If you rename something that changes several files, Undo (Ctrl+Z) should work for all files changed before
Describe the bug "Rename Symbol" (Right click on variable name, or F2) is a great feature, but it does not rename properly in Python evaluations: it removes underscores that are necessary to have valid python variables.
To Reproduce Steps to reproduce the behavior:
If possible add some example source code like:
Expected behavior The spaces in the variable could be automatically converted to underscores in the resulting inline python code.
Screenshots/ Videos BEFORE![image](https://github.com/d-biehl/robotcode/assets/33861657/d9b549e6-794e-4552-b933-104b86e950b6)
AFTER![image](https://github.com/d-biehl/robotcode/assets/33861657/86d4459b-50c3-48d6-bc0c-e0f7cd966a1c)
DESIRABLE![image](https://github.com/d-biehl/robotcode/assets/33861657/d6ab1a16-8d32-4b9f-a119-e8ac07e77c22)
Desktop (please complete the following information): VS Code Version 1.87.2 RobotCode Version 0.78.4 OS: Windows Python Version 3.11.8 RobotFramework Version 7.0
Additional context As a side note, it might be useful to deny multiple space in these symbol renaming because it will result in RobotFramework considering it as multiple symbols rather than a single variable or keyword. It is then not possible to use rename symbol again to perform the rollback operation. Which could be fixed by a Ctrl+Z, except that the renaming is done on multiple files, while Ctrl+Z only works on the current file.