From c159676fc647edb35359fcb1c044edd22e761dd7 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Thu, 19 May 2022 12:42:07 +0000 Subject: [PATCH] Fix 'try this' in untitled windows --- src/tacticsuggestions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tacticsuggestions.ts b/src/tacticsuggestions.ts index 9761eef..293e9f3 100644 --- a/src/tacticsuggestions.ts +++ b/src/tacticsuggestions.ts @@ -42,7 +42,8 @@ export class TacticSuggestions implements Disposable, CodeActionProvider { private findTextEditor(fileName: string) { for (const textEditor of window.visibleTextEditors) { - if (textEditor.document.uri.toString() === Uri.file(fileName).toString()) { + // note we cannot compare URIs as the `Message` type doesn't contain them + if (textEditor.document.fileName === fileName) { return textEditor; } }