Skip to content

Commit 99dbbe0

Browse files
committed
Fix coloring in generic tokens
1 parent 2d99c30 commit 99dbbe0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PSReadLine/ReadLine.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,10 +1490,10 @@ private void Render()
14901490
foregroundColor = _tokenForegroundColors[(int)GetTokenClassification(token)];
14911491
backgroundColor = _tokenBackgroundColors[(int)GetTokenClassification(token)];
14921492

1493-
if (token.Kind == TokenKind.StringExpandable || token.Kind == TokenKind.HereStringExpandable)
1493+
var stringToken = token as StringExpandableToken;
1494+
if (stringToken != null)
14941495
{
14951496
// We might have nested tokens.
1496-
var stringToken = (StringExpandableToken)token;
14971497
if (stringToken.NestedTokens != null && stringToken.NestedTokens.Any())
14981498
{
14991499
var tokens = new Token[stringToken.NestedTokens.Count + 1];

0 commit comments

Comments
 (0)