Use proper path check for TS/JS refactor on windows

Fixes #39445
This commit is contained in:
Matt Bierner
2017-12-05 12:51:25 -08:00
parent a90eaf59e2
commit 797b8fe015

View File

@@ -49,7 +49,7 @@ class ApplyRefactoringCommand implements Command {
const renameLocation = response.body.renameLocation;
if (renameLocation) {
if (vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.uri.fsPath === file) {
if (vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.uri.fsPath === document.uri.fsPath) {
const pos = tsLocationToVsPosition(renameLocation);
vscode.window.activeTextEditor.selection = new vscode.Selection(pos, pos);
await vscode.commands.executeCommand('editor.action.rename');