@@ -123,12 +123,12 @@ async Task DoDiffFile(IPullRequestFileNode file, bool workingDirectory)
123123 {
124124 try
125125 {
126- var relativePath = System . IO . Path . Combine ( file . DirectoryPath , file . FileName ) ;
126+ var rightPath = System . IO . Path . Combine ( file . DirectoryPath , file . FileName ) ;
127+ var leftPath = file . OldPath ?? rightPath ;
127128 var rightFile = workingDirectory ? ViewModel . GetLocalFilePath ( file ) : await ViewModel . ExtractFile ( file , true ) ;
128129 var leftFile = await ViewModel . ExtractFile ( file , false ) ;
129- var fullPath = System . IO . Path . Combine ( ViewModel . LocalRepository . LocalPath , relativePath ) ;
130- var leftLabel = $ "{ relativePath } ;{ ViewModel . TargetBranchDisplayName } ";
131- var rightLabel = workingDirectory ? relativePath : $ "{ relativePath } ;PR { ViewModel . Model . Number } ";
130+ var leftLabel = $ "{ leftPath } ;{ ViewModel . TargetBranchDisplayName } ";
131+ var rightLabel = workingDirectory ? rightPath : $ "{ rightPath } ;PR { ViewModel . Model . Number } ";
132132 var caption = $ "Diff - { file . FileName } ";
133133 var options = __VSDIFFSERVICEOPTIONS . VSDIFFOPT_DetectBinaryFiles |
134134 __VSDIFFSERVICEOPTIONS . VSDIFFOPT_LeftFileIsTemporary ;
@@ -161,11 +161,11 @@ async Task DoDiffFile(IPullRequestFileNode file, bool workingDirectory)
161161 var diffViewer = ( ( IVsDifferenceCodeWindow ) docView ) . DifferenceViewer ;
162162
163163 var session = ViewModel . Session ;
164- AddBufferTag ( diffViewer . LeftView . TextBuffer , session , relativePath , DiffSide . Left ) ;
164+ AddBufferTag ( diffViewer . LeftView . TextBuffer , session , leftPath , DiffSide . Left ) ;
165165
166166 if ( ! workingDirectory )
167167 {
168- AddBufferTag ( diffViewer . RightView . TextBuffer , session , relativePath , DiffSide . Right ) ;
168+ AddBufferTag ( diffViewer . RightView . TextBuffer , session , rightPath , DiffSide . Right ) ;
169169 }
170170
171171 if ( workingDirectory )
0 commit comments