Bläddra i källkod

Fixes broken open file command

main
Eric Amodio 5 år sedan
förälder
incheckning
be07f24142
2 ändrade filer med 11 tillägg och 1 borttagningar
  1. +4
    -0
      CHANGELOG.md
  2. +7
    -1
      src/views/viewCommands.ts

+ 4
- 0
CHANGELOG.md Visa fil

@ -14,6 +14,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- 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)
### Fixed
- Fixes the broken _Open File_ command on the root node of the _File History_ and _Line History_ views
## [9.6.0] - 2019-04-08
### Added

+ 7
- 1
src/views/viewCommands.ts Visa fil

@ -36,6 +36,8 @@ import {
} from './nodes';
import { ContributorNode } from './nodes/contributorNode';
import { Strings } from '../system/string';
import { FileHistoryNode } from './nodes/fileHistoryNode';
import { LineHistoryNode } from './nodes/lineHistoryNode';
export interface RefreshNodeCommandArgs {
maxCount?: number;
@ -373,9 +375,13 @@ export class ViewCommands implements Disposable {
return commands.executeCommand(Commands.DiffWithWorking, node.uri, args);
}
private openFile(node: CommitFileNode | ResultsFileNode | StashFileNode | StatusFileNode) {
private openFile(
node: CommitFileNode | FileHistoryNode | LineHistoryNode | ResultsFileNode | StashFileNode | StatusFileNode
) {
if (
!(node instanceof CommitFileNode) &&
!(node instanceof FileHistoryNode) &&
!(node instanceof LineHistoryNode) &&
!(node instanceof ResultsFileNode) &&
!(node instanceof StatusFileNode)
) {

Laddar…
Avbryt
Spara