File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 76737673 },
76747674 {
76757675 "command" : " gitlens.views.setBranchComparisonToWorking" ,
7676- "when" : " viewItem =~ /gitlens:compare:branch\\ b(?=.*?\\ b\\ +comparing \\ b)(?=.*?\\ b\\ +current\\ b)(?=.*?\\ b\\ +branch\\ b)/" ,
7676+ "when" : " viewItem =~ /gitlens:compare:branch\\ b(?=.*?\\ b\\ +root \\ b)(?=.*?\\ b\\ +current\\ b)(?=.*?\\ b\\ +branch\\ b)/" ,
76777677 "group" : " inline@2"
76787678 },
76797679 {
76807680 "command" : " gitlens.views.setBranchComparisonToBranch" ,
7681- "when" : " viewItem =~ /gitlens:compare:branch\\ b(?=.*?\\ b\\ +comparing \\ b)(?=.*?\\ b\\ +current\\ b)(?=.*?\\ b\\ +working\\ b)/" ,
7681+ "when" : " viewItem =~ /gitlens:compare:branch\\ b(?=.*?\\ b\\ +root \\ b)(?=.*?\\ b\\ +current\\ b)(?=.*?\\ b\\ +working\\ b)/" ,
76827682 "group" : " inline@2"
76837683 },
76847684 {
76857685 "command" : " gitlens.views.setBranchComparisonToWorking" ,
7686- "when" : " viewItem =~ /gitlens:compare:branch\\ b(?=.*?\\ b\\ +comparing \\ b)(?=.*?\\ b\\ +current\\ b)(?=.*?\\ b\\ +branch\\ b)/" ,
7686+ "when" : " viewItem =~ /gitlens:compare:branch\\ b(?=.*?\\ b\\ +root \\ b)(?=.*?\\ b\\ +current\\ b)(?=.*?\\ b\\ +branch\\ b)/" ,
76877687 "group" : " 1_gitlens@2"
76887688 },
76897689 {
76907690 "command" : " gitlens.views.setBranchComparisonToBranch" ,
7691- "when" : " viewItem =~ /gitlens:compare:branch\\ b(?=.*?\\ b\\ +comparing \\ b)(?=.*?\\ b\\ +current\\ b)(?=.*?\\ b\\ +working\\ b)/" ,
7691+ "when" : " viewItem =~ /gitlens:compare:branch\\ b(?=.*?\\ b\\ +root \\ b)(?=.*?\\ b\\ +current\\ b)(?=.*?\\ b\\ +working\\ b)/" ,
76927692 "group" : " 1_gitlens@2"
76937693 },
76947694 {
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export class CompareBranchNode extends ViewNode<BranchesView | CommitsView | Rep
2929 view : BranchesView | CommitsView | RepositoriesView ,
3030 parent : ViewNode ,
3131 public readonly branch : GitBranch ,
32- private readonly showComparison : ViewShowBranchComparison ,
32+ private showComparison : ViewShowBranchComparison ,
3333 // Specifies that the node is shown as a root
3434 public readonly root : boolean = false ,
3535 ) {
@@ -198,6 +198,8 @@ export class CompareBranchNode extends ViewNode<BranchesView | CommitsView | Rep
198198 async setComparisonType ( comparisonType : Exclude < ViewShowBranchComparison , false > ) {
199199 if ( this . _compareWith != null ) {
200200 await this . updateCompareWith ( { ...this . _compareWith , type : comparisonType } ) ;
201+ } else {
202+ this . showComparison = comparisonType ;
201203 }
202204
203205 this . _children = undefined ;
You can’t perform that action at this time.
0 commit comments