You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When renaming from.txt -> to.txt using the new api, if to.txt already exists, nothing happens.
I'd expect the other file to be overwritten, though it would also make sense to leave it as it is and make renameResource to return some value that represents that the renaming didn't happen.
The text was updated successfully, but these errors were encountered:
Another problem I found was renaming and then modifying the new file.
For example:
let we = new vscode.WorkspaceEdit();
we.renameResource(currentUri, newUri);
we.insert(newUri, position, "InsertText");
vscode.workspace.applyEdit(we);
Does the rename but doesn't insert the text in the new file.
Creating a new WorkspaceEdit doesn't work as expected either
let we = new vscode.WorkspaceEdit();
we.renameResource(currentUri, newUri);
vscode.workspace.applyEdit(we);
let we2 = new vscode.WorkspaceEdit();
we2.insert(newUri, position, "InsertText");
vscode.workspace.applyEdit(we2);
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.
Testing #42334
When renaming
from.txt -> to.txt
using the new api, ifto.txt
already exists, nothing happens.I'd expect the other file to be overwritten, though it would also make sense to leave it as it is and make renameResource to return some value that represents that the renaming didn't happen.
The text was updated successfully, but these errors were encountered: