Skip to content

Commit

Permalink
use pattern matching
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarolf committed Jan 28, 2021
1 parent 9a8c9af commit c977ccb
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,14 @@ public bool NavigateToBestMatch(TextSpan span, string? kind = null,
_isNavigatingFromSourceToTree = false;
}

if (highlightMatch && match is not null)
{
match.Background = Brushes.Yellow;
match.BorderBrush = Brushes.Black;
match.BorderThickness = s_defaultBorderThickness;
}
if (!highlightMatch || match is null)
return false;

return match is not null;
match.Background = Brushes.Yellow;
match.BorderBrush = Brushes.Black;
match.BorderThickness = s_defaultBorderThickness;

return true;
}
#endregion

Expand Down

0 comments on commit c977ccb

Please sign in to comment.