Skip to content

Commit 48893b7

Browse files
committed
🎨 Implement two useful nit-picks from CoPilot
1 parent 1353029 commit 48893b7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/extension/provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class DiffViewerProvider implements vscode.CustomTextEditorProvider {
4444
vscode.commands.registerCommand("diffviewer.showLineByLine", () => setOutputFormatConfig("line-by-line")),
4545
vscode.commands.registerCommand("diffviewer.showSideBySide", () => setOutputFormatConfig("side-by-side")),
4646
vscode.commands.registerCommand("diffviewer.openCollapsed", async (file) => {
47-
const collapsedUri = vscode.Uri.from({ ...file, query: "collapsed" });
47+
const collapsedUri = file.with({ query: "collapsed" });
4848
await vscode.commands.executeCommand("vscode.openWith", collapsedUri, "diffViewer");
4949
}),
5050
];

src/webview/message/handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class MessageToWebviewHandlerImpl extends GenericMessageHandlerImpl imple
125125
this.updateDiff2HtmlFileCollapsed(toggle, viewed);
126126
toggle.classList.remove(CHANGED_SINCE_VIEWED);
127127
// no await here so we synchronously return from this function, the sending will happen later as hashes get computed
128-
this.sendFileViewedMessage(toggle, viewed);
128+
void this.sendFileViewedMessage(toggle, viewed);
129129
}
130130
}
131131

0 commit comments

Comments
 (0)