@@ -9,6 +9,7 @@ import type { ContextKeys } from '../../constants.context';
99import  type  {  HomeTelemetryContext  }  from  '../../constants.telemetry' ; 
1010import  type  {  Container  }  from  '../../container' ; 
1111import  {  executeGitCommand  }  from  '../../git/actions' ; 
12+ import  {  openComparisonChanges  }  from  '../../git/actions/commit' ; 
1213import  *  as  RepoActions  from  '../../git/actions/repository' ; 
1314import  type  {  BranchContributorOverview  }  from  '../../git/gitProvider' ; 
1415import  type  {  GitBranch  }  from  '../../git/models/branch' ; 
@@ -266,6 +267,7 @@ export class HomeWebviewProvider implements WebviewProvider<State, State, HomeWe
266267				( )  =>  this . container . subscription . validate ( {  force : true  } ) , 
267268				this , 
268269			) , 
270+ 			registerCommand ( 'gitlens.home.openPullRequestChanges' ,  this . pullRequestChanges ,  this ) , 
269271			registerCommand ( 'gitlens.home.openPullRequestComparison' ,  this . pullRequestCompare ,  this ) , 
270272			registerCommand ( 'gitlens.home.openPullRequestOnRemote' ,  this . pullRequestViewOnRemote ,  this ) , 
271273			registerCommand ( 'gitlens.home.createPullRequest' ,  this . pullRequestCreate ,  this ) , 
@@ -773,11 +775,27 @@ export class HomeWebviewProvider implements WebviewProvider<State, State, HomeWe
773775		if  ( pr ?. refs ?. base  ==  null  ||  pr . refs . head  ==  null )  return ; 
774776
775777		const  comparisonRefs  =  getComparisonRefsForPullRequest ( refs . repoPath ,  pr . refs ) ; 
776- 		return  this . container . views . searchAndCompare 
777- 			. compare ( comparisonRefs . repoPath ,  comparisonRefs . head ,  comparisonRefs . base ) 
778- 			. then ( compareNode  =>  { 
779- 				executeCommand ( Commands . ViewsOpenAllChangedFileDiffs ,  compareNode ) ; 
780- 			} ) ; 
778+ 		return  this . container . views . searchAndCompare . compare ( 
779+ 			comparisonRefs . repoPath , 
780+ 			comparisonRefs . head , 
781+ 			comparisonRefs . base , 
782+ 		) ; 
783+ 	} 
784+ 
785+ 	private  async  pullRequestChanges ( refs : BranchRef )  { 
786+ 		const  pr  =  await  this . findPullRequest ( refs ) ; 
787+ 		if  ( pr ?. refs ?. base  ==  null  ||  pr . refs . head  ==  null )  return ; 
788+ 
789+ 		const  comparisonRefs  =  getComparisonRefsForPullRequest ( refs . repoPath ,  pr . refs ) ; 
790+ 		return  openComparisonChanges ( 
791+ 			this . container , 
792+ 			{ 
793+ 				repoPath : comparisonRefs . repoPath , 
794+ 				lhs : comparisonRefs . base . ref , 
795+ 				rhs : comparisonRefs . head . ref , 
796+ 			} , 
797+ 			{  title : `Changes in Pull Request #${ pr . id }  `  } , 
798+ 		) ; 
781799	} 
782800
783801	private  async  pullRequestViewOnRemote ( refs : BranchRef ,  clipboard ?: boolean )  { 
0 commit comments