From a81ab8ea19f73df501b9024d551952a4e257c78f Mon Sep 17 00:00:00 2001 From: Alexey Date: Wed, 31 May 2023 22:07:48 +0300 Subject: [PATCH] faster paint empty-inside caret --- atsynedit/atsynedit.pas | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/atsynedit/atsynedit.pas b/atsynedit/atsynedit.pas index dc696ede..9a3b75e6 100644 --- a/atsynedit/atsynedit.pas +++ b/atsynedit/atsynedit.pas @@ -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;