@@ -922,15 +922,15 @@ public void NavigateToCommit(string sha)
922922 }
923923 }
924924
925- public void NavigateToCurrentHead ( )
925+ public void NavigateToCommitDelayed ( string sha )
926926 {
927- if ( _currentBranch != null )
928- NavigateToCommit ( _currentBranch . Head ) ;
927+ _navigateToCommitDelayed = sha ;
929928 }
930929
931- public void NavigateToBranchDelayed ( string branch )
930+ public void NavigateToCurrentHead ( )
932931 {
933- _navigateToBranchDelayed = branch ;
932+ if ( _currentBranch != null )
933+ NavigateToCommit ( _currentBranch . Head ) ;
934934 }
935935
936936 public void ClearHistoriesFilter ( )
@@ -1189,15 +1189,11 @@ public void RefreshCommits()
11891189
11901190 BisectState = _histories . UpdateBisectInfo ( ) ;
11911191
1192- if ( ! string . IsNullOrEmpty ( _navigateToBranchDelayed ) )
1193- {
1194- var branch = _branches . Find ( x => x . FullName == _navigateToBranchDelayed ) ;
1195- if ( branch != null )
1196- NavigateToCommit ( branch . Head ) ;
1197- }
1192+ if ( ! string . IsNullOrEmpty ( _navigateToCommitDelayed ) )
1193+ NavigateToCommit ( _navigateToCommitDelayed ) ;
11981194 }
11991195
1200- _navigateToBranchDelayed = string . Empty ;
1196+ _navigateToCommitDelayed = string . Empty ;
12011197 } ) ;
12021198 }
12031199
@@ -2937,6 +2933,6 @@ private void AutoFetchImpl(object sender)
29372933 private Models . BisectState _bisectState = Models . BisectState . None ;
29382934 private bool _isBisectCommandRunning = false ;
29392935
2940- private string _navigateToBranchDelayed = string . Empty ;
2936+ private string _navigateToCommitDelayed = string . Empty ;
29412937 }
29422938}
0 commit comments