Skip to content

Commit d5745b4

Browse files
committed
enhance: do nothing if target is a binary file while blaming
1 parent 44f7877 commit d5745b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Views/Blame.axaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,10 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
352352

353353
if (change.Property == BlameDataProperty)
354354
{
355-
if (BlameData != null)
355+
if (BlameData is { IsBinary: false } blame)
356356
{
357-
Models.TextMateHelper.SetGrammarByFileName(_textMate, BlameData.File);
358-
Text = BlameData.Content;
357+
Models.TextMateHelper.SetGrammarByFileName(_textMate, blame.File);
358+
Text = blame.Content;
359359
}
360360
else
361361
{

0 commit comments

Comments
 (0)