Skip to content

Commit be07f24

Browse files
committed
Fixes broken open file command
1 parent 03d6a0e commit be07f24

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1414

1515
- Removes `-m` flag from `git log` when following renames (using `--follow`), because it ends up returning all merge commits (regardless if the file in question was changed or not)
1616

17+
### Fixed
18+
19+
- Fixes the broken _Open File_ command on the root node of the _File History_ and _Line History_ views
20+
1721
## [9.6.0] - 2019-04-08
1822

1923
### Added

src/views/viewCommands.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ import {
3636
} from './nodes';
3737
import { ContributorNode } from './nodes/contributorNode';
3838
import { Strings } from '../system/string';
39+
import { FileHistoryNode } from './nodes/fileHistoryNode';
40+
import { LineHistoryNode } from './nodes/lineHistoryNode';
3941

4042
export interface RefreshNodeCommandArgs {
4143
maxCount?: number;
@@ -373,9 +375,13 @@ export class ViewCommands implements Disposable {
373375
return commands.executeCommand(Commands.DiffWithWorking, node.uri, args);
374376
}
375377

376-
private openFile(node: CommitFileNode | ResultsFileNode | StashFileNode | StatusFileNode) {
378+
private openFile(
379+
node: CommitFileNode | FileHistoryNode | LineHistoryNode | ResultsFileNode | StashFileNode | StatusFileNode
380+
) {
377381
if (
378382
!(node instanceof CommitFileNode) &&
383+
!(node instanceof FileHistoryNode) &&
384+
!(node instanceof LineHistoryNode) &&
379385
!(node instanceof ResultsFileNode) &&
380386
!(node instanceof StatusFileNode)
381387
) {

0 commit comments

Comments
 (0)