feature: using TextBlock instead of SelectableTextBlock for commit SHA and add a button to copy it

This commit is contained in:
leo 2024-08-27 12:20:36 +08:00
parent 6cf9448313
commit e0b09d4dd4
No known key found for this signature in database
7 changed files with 23 additions and 13 deletions

View file

@ -207,14 +207,13 @@ namespace SourceGit.Views
if (matches.Count == 0)
{
Inlines.Add(new Run(subject));
InvalidateTextLayout();
return;
}
matches.Sort((l, r) => l.Start - r.Start);
_matches = matches;
var inlines = new List<Run>();
var inlines = new List<Inline>();
var pos = 0;
foreach (var match in matches)
{
@ -232,7 +231,6 @@ namespace SourceGit.Views
inlines.Add(new Run(subject.Substring(pos)));
Inlines.AddRange(inlines);
InvalidateTextLayout();
}
}