New renaming of symbol feature within version 0.26.0-insiders2 is accepting special characters, and after mistaken press enter to change symbol name. Then there is no possible way to undo the changes, then I have to traverse each and every file to manually to change the name.
We will fix this before the official release. Thanks for reporting it!
Rename in TypeScript appears to accepts special characters as well (and applies them). Perhaps that would be a VS Code issue? Also, renaming does not save changes, it opens modified files in an unsaved state. Undo/Control-Z will undo a rename, or the modified files can be closed without saving.
Rename in TypeScript appears to accepts special characters as well (and applies them). Perhaps that would be a VS Code issue? Also, renaming does not save changes, it opens modified files in an unsaved state. Undo/Control-Z will undo a rename, or the modified files can be closed without saving.
I tried with Visual Studio 2017 rename functionality. It blocks the user to insert a dot(.), comma(,) etc in the renaming of a symbol. Also, we have to be careful while closing other opened files, we might lost some of our important work. Even if renaming accepts some restricted special characters, there should be a clean way to revert changes.
I really like this feature though 馃槂 .
here is no possible way to undo the changes
@karan-k-deepr . A rename is part of the undo/redo stack. You should be able to undo a rename operation by issuing an Undo.
here is no possible way to undo the changes
@karan-k-deepr . A rename is part of the undo/redo stack. You should be able to undo a rename operation by issuing an Undo.
I tried undo as well but it only works when rename happen within the file. But not when rename happened across multiple files. Example:
// MyClass.h
MyClass
{
public:
MyClass();
private:
int test_me;
};
// MyClass.cpp
#include "main.h"
MyClass::MyClass() : test_me(0)
{}
Now issue a rename of test_me to test.me. It will rename variable in MyClass.h and MyClass.cpp.
And when you issue an undo command (Ctrl + Z) then it will undo changes within the current open file, but not across all files.
Related vscode issue: https://github.com/microsoft/vscode/issues/45384. You may want to upvote this. It seems that other languages are not doing validation. We may align with them.
Fixed in version 0.26.2-insiders, available at https://github.com/microsoft/vscode-cpptools/releases/tag/0.26.2-insiders.
Fixed in version 0.26.2-insiders, available at https://github.com/microsoft/vscode-cpptools/releases/tag/0.26.2-insiders.
Yeah, it is working fine. CHEERS