Skip to content

Commit

Permalink
Fix 'try this' in untitled windows
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wieser committed May 19, 2022
1 parent 8d2efce commit c159676
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tacticsuggestions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit c159676

Please sign in to comment.