Noop when moving a symbol into the file it is already in (#183866)

Fixes #183793
This commit is contained in:
Matt Bierner 2023-05-30 13:40:45 -07:00 committed by GitHub
parent 8d59fc4e0f
commit 8a71f8515d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,7 +145,7 @@ class MoveToFileRefactorCommand implements Command {
}
const targetFile = await this.getTargetFile(args.document, file, args.range);
if (!targetFile) {
if (!targetFile || targetFile.toString() === file.toString()) {
return;
}