diff --git a/src/ViewModels/Histories.cs b/src/ViewModels/Histories.cs index b5a72763..10f4b60a 100644 --- a/src/ViewModels/Histories.cs +++ b/src/ViewModels/Histories.cs @@ -153,7 +153,11 @@ namespace SourceGit.ViewModels else if (commits.Count == 1) { var commit = commits[0] as Models.Commit; - _repo.SearchResultSelectedCommit = commit; + + if (_repo.SearchResultSelectedCommit == null || _repo.SearchResultSelectedCommit.SHA != commit.SHA) + { + _repo.SearchResultSelectedCommit = _repo.SearchedCommits.Find(x => x.SHA == commit.SHA); + } AutoSelectedCommit = commit; NavigationId = _navigationId + 1; diff --git a/src/Views/Repository.axaml b/src/Views/Repository.axaml index 522f9ee3..63c73938 100644 --- a/src/Views/Repository.axaml +++ b/src/Views/Repository.axaml @@ -460,12 +460,6 @@ - -