Skip to content

Commit 4aad6a7

Browse files
committed
fix: System.ArgumentException when hover the commit link multiple times before the first time tooltip shows (#765)
1 parent db8ee34 commit 4aad6a7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ViewModels/CherryPick.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Collections.Generic;
2-
using System.Text;
32
using System.Threading.Tasks;
43

54
namespace SourceGit.ViewModels

src/Views/CommitMessagePresenter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ private void ProcessHoverCommitLink(Models.Hyperlink link)
296296
if (currentParent is { DataContext: ViewModels.CommitDetail currentDetail } &&
297297
currentDetail.Commit.SHA == lastDetailCommit)
298298
{
299-
_inlineCommits.Add(sha, c);
299+
if (!_inlineCommits.ContainsKey(sha))
300+
_inlineCommits.Add(sha, c);
300301

301302
// Make sure user still hovers the target SHA.
302303
if (_lastHover == link && c != null)

0 commit comments

Comments
 (0)