Skip to content

Commit

Permalink
faster paint empty-inside caret
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed May 31, 2023
1 parent 7a0a2eb commit a81ab8e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions atsynedit/atsynedit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -7553,10 +7553,7 @@ procedure TATSynEdit.DoPaintCaretShape(C: TCanvas; ARect: TRect;

if ACaretShape.EmptyInside then
begin
CanvasInvertRect(C, Rect(ARect.Left, ARect.Top, ARect.Right, ARect.Top+1), Colors.Caret);
CanvasInvertRect(C, Rect(ARect.Left, ARect.Bottom-1, ARect.Right, ARect.Bottom), Colors.Caret);
CanvasInvertRect(C, Rect(ARect.Left, ARect.Top+1, ARect.Left, ARect.Bottom-1), Colors.Caret);
CanvasInvertRect(C, Rect(ARect.Right-1, ARect.Top+1, ARect.Right-1, ARect.Bottom-1), Colors.Caret);
CanvasInvertFrameRect(C, ARect, Colors.Caret);
exit;
end;

Expand Down

2 comments on commit a81ab8e

@Alexey-T
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@veksha another speedup of empty-inside caret paint. OK on Win? tested on linux.

@veksha
Copy link
Contributor

@veksha veksha commented on a81ab8e May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. good.

Please sign in to comment.