Skip to content

Commit

Permalink
adopt suggested change from coderabbit review
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
tomlm and coderabbitai[bot] authored Nov 1, 2024
1 parent 553d87e commit e88a0b6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Consolonia.Core/Drawing/DrawingContextImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,12 @@ private Line TransformLineInternal(Line line)
/// <returns></returns>
private bool IfMoveConsoleCaretMove(IPen pen, Point head)
{
if (pen.Brush is MoveConsoleCaretToPositionBrush)
{
CurrentClip.ExecuteWithClipping(head,
() => { _pixelBuffer.Set((PixelBufferCoordinate)head, pixel => pixel.Blend(new Pixel(true))); });
return true;
}

return false;
if (pen.Brush is not MoveConsoleCaretToPositionBrush)
return false;

CurrentClip.ExecuteWithClipping(head,
() => { _pixelBuffer.Set((PixelBufferCoordinate)head, pixel => pixel.Blend(new Pixel(true))); });
return true;
}

/// <summary>
Expand Down

0 comments on commit e88a0b6

Please sign in to comment.