ソースを参照

Fixes working/branch toggle incorrectly showing

Adds working/branch toggle before a comparision is selected
main
Eric Amodio 4年前
コミット
872104213f
2個のファイルの変更7行の追加5行の削除
  1. +4
    -4
      package.json
  2. +3
    -1
      src/views/nodes/compareBranchNode.ts

+ 4
- 4
package.json ファイルの表示

@ -7673,22 +7673,22 @@
},
{
"command": "gitlens.views.setBranchComparisonToWorking",
"when": "viewItem =~ /gitlens:compare:branch\b(?=.*?\b\+comparing\b)(?=.*?\b\+current\b)(?=.*?\b\+branch\b)/",
"when": "viewItem =~ /gitlens:compare:branch\b(?=.*?\b\+root\b)(?=.*?\b\+current\b)(?=.*?\b\+branch\b)/",
"group": "inline@2"
},
{
"command": "gitlens.views.setBranchComparisonToBranch",
"when": "viewItem =~ /gitlens:compare:branch\b(?=.*?\b\+comparing\b)(?=.*?\b\+current\b)(?=.*?\b\+working\b)/",
"when": "viewItem =~ /gitlens:compare:branch\b(?=.*?\b\+root\b)(?=.*?\b\+current\b)(?=.*?\b\+working\b)/",
"group": "inline@2"
},
{
"command": "gitlens.views.setBranchComparisonToWorking",
"when": "viewItem =~ /gitlens:compare:branch\b(?=.*?\b\+comparing\b)(?=.*?\b\+current\b)(?=.*?\b\+branch\b)/",
"when": "viewItem =~ /gitlens:compare:branch\b(?=.*?\b\+root\b)(?=.*?\b\+current\b)(?=.*?\b\+branch\b)/",
"group": "1_gitlens@2"
},
{
"command": "gitlens.views.setBranchComparisonToBranch",
"when": "viewItem =~ /gitlens:compare:branch\b(?=.*?\b\+comparing\b)(?=.*?\b\+current\b)(?=.*?\b\+working\b)/",
"when": "viewItem =~ /gitlens:compare:branch\b(?=.*?\b\+root\b)(?=.*?\b\+current\b)(?=.*?\b\+working\b)/",
"group": "1_gitlens@2"
},
{

+ 3
- 1
src/views/nodes/compareBranchNode.ts ファイルの表示

@ -29,7 +29,7 @@ export class CompareBranchNode extends ViewNode
view: BranchesView | CommitsView | RepositoriesView,
parent: ViewNode,
public readonly branch: GitBranch,
private readonly showComparison: ViewShowBranchComparison,
private showComparison: ViewShowBranchComparison,
// Specifies that the node is shown as a root
public readonly root: boolean = false,
) {
@ -198,6 +198,8 @@ export class CompareBranchNode extends ViewNode
async setComparisonType(comparisonType: Exclude<ViewShowBranchComparison, false>) {
if (this._compareWith != null) {
await this.updateCompareWith({ ...this._compareWith, type: comparisonType });
} else {
this.showComparison = comparisonType;
}
this._children = undefined;

||||||
x
 
000:0
読み込み中…
キャンセル
保存