Skip to content

Commit 78e48b2

Browse files
committed
Fix specific arguments for file diff command
1 parent fac02ab commit 78e48b2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/components/FileList.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,18 @@ export class FileList extends React.Component<IFileListProps, IFileListState> {
9191
}
9292

9393
commands.forEach(command => {
94-
contextMenu.addItem({ command, args: selectedFile as any });
94+
if (command === CommandIDs.gitFileDiff) {
95+
contextMenu.addItem({
96+
command,
97+
args: {
98+
filePath: selectedFile.to,
99+
isText: !selectedFile.is_binary,
100+
status: selectedFile.status
101+
}
102+
});
103+
} else {
104+
contextMenu.addItem({ command, args: selectedFile as any });
105+
}
95106
});
96107
contextMenu.open(event.clientX, event.clientY);
97108
};

0 commit comments

Comments
 (0)