Quellcode durchsuchen

Fixes #691 - Keep expand/collapse state on swap

main
Eric Amodio vor 5 Jahren
Ursprung
Commit
10dfbc65d9
2 geänderte Dateien mit 8 neuen und 3 gelöschten Zeilen
  1. +1
    -0
      CHANGELOG.md
  2. +7
    -3
      src/views/nodes/compareResultsNode.ts

+ 1
- 0
CHANGELOG.md Datei anzeigen

@ -34,6 +34,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Fixes [#683](https://github.com/eamodio/vscode-gitlens/issues/683) - log.showSignature leads to stray files being displayed
- Fixes [#691](https://github.com/eamodio/vscode-gitlens/issues/691) - Auto-expand tree view on Swap Comparison
- Fixes the behavior of the _Open Line Changes with Previous Revision_ (`gitlens.diffLineWithPrevious`) command to follow the line history much better
## [9.5.1] - 2019-02-13

+ 7
- 3
src/views/nodes/compareResultsNode.ts Datei anzeigen

@ -7,9 +7,9 @@ import { log, Strings } from '../../system';
import { CompareView } from '../compareView';
import { CommitsQueryResults, ResultsCommitsNode } from './resultsCommitsNode';
import { ResultsFilesNode } from './resultsFilesNode';
import { ResourceType, ViewNode } from './viewNode';
import { ResourceType, SubscribeableViewNode, ViewNode } from './viewNode';
export class CompareResultsNode extends ViewNode<CompareView> {
export class CompareResultsNode extends SubscribeableViewNode<CompareView> {
constructor(
view: CompareView,
public readonly repoPath: string,
@ -52,7 +52,7 @@ export class CompareResultsNode extends ViewNode {
description = (repo && repo.formattedName) || this.uri.repoPath;
}
const item = new TreeItem(this.label, TreeItemCollapsibleState.Collapsed);
const item = new TreeItem(this.label, this._state || TreeItemCollapsibleState.Collapsed);
item.contextValue = ResourceType.CompareResults;
if (this._pinned) {
item.contextValue += '+pinned';
@ -118,6 +118,10 @@ export class CompareResultsNode extends ViewNode {
this.view.triggerNodeChange(this);
}
protected subscribe() {
return undefined;
}
private async getCommitsQuery(maxCount: number | undefined): Promise<CommitsQueryResults> {
const log = await Container.git.getLog(this.uri.repoPath!, {
maxCount: maxCount,

Laden…
Abbrechen
Speichern