Skip to content

Commit 79f5720

Browse files
authored
Merge pull request #2480 from codefori/fix/compare_files
2 parents 2848a5f + 2816cb6 commit 79f5720

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/commands/compare.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import Instance from "../Instance";
33

44
let selectedForCompare: Uri;
55

6+
const VSCODE_DIFF_COMMAND = `vscode.diff`;
7+
68
export function registerCompareCommands(instance: Instance): Disposable[] {
79
return [
810
commands.registerCommand(`code-for-ibmi.selectForCompare`, async (node) => {
@@ -32,7 +34,7 @@ export function registerCompareCommands(instance: Instance): Disposable[] {
3234
}
3335

3436
if (uri) {
35-
commands.executeCommand(`diff`, selectedForCompare, uri);
37+
commands.executeCommand(VSCODE_DIFF_COMMAND, selectedForCompare, uri);
3638
} else {
3739
window.showErrorMessage(`No compare to path provided.`);
3840
}
@@ -66,7 +68,7 @@ export function registerCompareCommands(instance: Instance): Disposable[] {
6668
if (editor) {
6769
activeFile = editor.document.uri;
6870
if (activeFile) {
69-
commands.executeCommand(`diff`, activeFile, selectedFile);
71+
commands.executeCommand(VSCODE_DIFF_COMMAND, activeFile, selectedFile);
7072
} else {
7173
window.showInformationMessage(l10n.t(`No file is open or selected`));
7274
}
@@ -109,7 +111,7 @@ async function compareCurrentFile(node: any, scheme: `streamfile` | `file` | `me
109111
compareWith = `/${compareWith}`;
110112
}
111113
let uri = Uri.parse(`${scheme}:${compareWith}`);
112-
commands.executeCommand(`vscode.diff`, currentFile, uri);
114+
commands.executeCommand(VSCODE_DIFF_COMMAND, currentFile, uri);
113115
}
114116
} else {
115117
window.showInformationMessage(l10n.t(`No file is open or selected`));

0 commit comments

Comments
 (0)