From ee2e7d01270c5bdfe94384a51a8736de98b32101 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 3 Jun 2025 14:12:23 +0800 Subject: [PATCH] enhance: ignores `$` char when measuring contents in `NamedHighlightedTextBlock` Signed-off-by: leo --- src/Views/NameHighlightedTextBlock.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Views/NameHighlightedTextBlock.cs b/src/Views/NameHighlightedTextBlock.cs index a7ff5015..0d273106 100644 --- a/src/Views/NameHighlightedTextBlock.cs +++ b/src/Views/NameHighlightedTextBlock.cs @@ -55,9 +55,10 @@ namespace SourceGit.Views if (string.IsNullOrEmpty(text)) return base.MeasureOverride(availableSize); + var trimmed = text.Replace("$", ""); var typeface = new Typeface(FontFamily); var formatted = new FormattedText( - Text, + trimmed, CultureInfo.CurrentCulture, FlowDirection.LeftToRight, typeface,