From 4a54027a823398934ed2dfe82bc41f72f883b8eb Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 4 Nov 2020 16:36:49 -0800 Subject: [PATCH] Disable rename after refactoring in interactive playground Fixes #75137 --- .../src/languageFeatures/refactor.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/extensions/typescript-language-features/src/languageFeatures/refactor.ts b/extensions/typescript-language-features/src/languageFeatures/refactor.ts index b74e90c18de..cc8c0a5d3a7 100644 --- a/extensions/typescript-language-features/src/languageFeatures/refactor.ts +++ b/extensions/typescript-language-features/src/languageFeatures/refactor.ts @@ -53,10 +53,13 @@ class DidApplyRefactoringCommand implements Command { const renameLocation = args.codeAction.renameLocation; if (renameLocation) { - await vscode.commands.executeCommand('editor.action.rename', [ - args.codeAction.document.uri, - typeConverters.Position.fromLocation(renameLocation) - ]); + // Disable renames in interactive playground https://github.com/microsoft/vscode/issues/75137 + if (args.codeAction.document.uri.scheme !== fileSchemes.walkThroughSnippet) { + await vscode.commands.executeCommand('editor.action.rename', [ + args.codeAction.document.uri, + typeConverters.Position.fromLocation(renameLocation) + ]); + } } } }