@@ -109,9 +109,7 @@ public async Task<ITextView> OpenFile(
109109 if ( ! workingDirectory )
110110 {
111111 AddBufferTag ( wpfTextView . TextBuffer , session , fullPath , commitSha , null ) ;
112-
113- var file = await session . GetFile ( relativePath ) ;
114- EnableNavigateToEditor ( textView , session , file ) ;
112+ EnableNavigateToEditor ( textView , session ) ;
115113 }
116114 }
117115
@@ -201,9 +199,9 @@ await pullRequestService.ExtractToTempFile(
201199 if ( ! workingDirectory )
202200 {
203201 AddBufferTag ( diffViewer . RightView . TextBuffer , session , rightPath , file . CommitSha , DiffSide . Right ) ;
204- EnableNavigateToEditor ( diffViewer . LeftView , session , file ) ;
205- EnableNavigateToEditor ( diffViewer . RightView , session , file ) ;
206- EnableNavigateToEditor ( diffViewer . InlineView , session , file ) ;
202+ EnableNavigateToEditor ( diffViewer . LeftView , session ) ;
203+ EnableNavigateToEditor ( diffViewer . RightView , session ) ;
204+ EnableNavigateToEditor ( diffViewer . InlineView , session ) ;
207205 }
208206
209207 if ( workingDirectory )
@@ -492,17 +490,17 @@ void AddBufferTag(
492490 }
493491 }
494492
495- void EnableNavigateToEditor ( ITextView textView , IPullRequestSession session , IPullRequestSessionFile file )
493+ void EnableNavigateToEditor ( ITextView textView , IPullRequestSession session )
496494 {
497495 var vsTextView = vsEditorAdaptersFactory . GetViewAdapter ( textView ) ;
498- EnableNavigateToEditor ( vsTextView , session , file ) ;
496+ EnableNavigateToEditor ( vsTextView , session ) ;
499497 }
500498
501- void EnableNavigateToEditor ( IVsTextView vsTextView , IPullRequestSession session , IPullRequestSessionFile file )
499+ void EnableNavigateToEditor ( IVsTextView vsTextView , IPullRequestSession session )
502500 {
503501 var commandGroup = VSConstants . CMDSETID . StandardCommandSet2K_guid ;
504502 var commandId = ( int ) VSConstants . VSStd2KCmdID . RETURN ;
505- new TextViewCommandDispatcher ( vsTextView , commandGroup , commandId , openFileInSolutionCommand ) ;
503+ TextViewCommandDispatcher . AddCommandFilter ( vsTextView , commandGroup , commandId , openFileInSolutionCommand ) ;
506504
507505 EnableNavigateStatusBarMessage ( vsTextView , session ) ;
508506 }
0 commit comments