SynEdit: Multi-caret: On windows use system settings for caret blink rate. issue #30513

git-svn-id: trunk@58292 -
This commit is contained in:
martin 2018-06-16 20:34:07 +00:00
parent b1f7528188
commit d263fdd881

View File

@ -36,6 +36,9 @@ unit SynEditPointClasses;
interface
uses
{$IFDEF windows}
windows,
{$ENDIF}
Classes, SysUtils,
// LCL
Controls, LCLProc, LCLType, LCLIntf, ExtCtrls, Graphics, Forms,
@ -2505,12 +2508,20 @@ begin
end;
constructor TSynEditScreenCaretTimer.Create;
var
i: UINT;
begin
FTimerList := TMethodList.Create;
FAfterPaintList := TMethodList.Create;
FTimer := TTimer.Create(nil);
FTimer.Enabled := False;
{$IFDEF windows}
i := GetCaretBlinkTime;
if (i = high(i)) or (i = 0) then i := 500; // TODO: none blinking caret. Not yet supported
FTimer.Interval := i;
{$ELSE}
FTimer.Interval := 500;
{$ENDIF}
FTimer.OnTimer := @DoTimer;
end;