diff --git a/components/synedit/synedittextbuffer.pp b/components/synedit/synedittextbuffer.pp index 0143df2af7..351f0ae244 100644 --- a/components/synedit/synedittextbuffer.pp +++ b/components/synedit/synedittextbuffer.pp @@ -1092,7 +1092,7 @@ begin // UTF8 handing of chars Result := ALogicalPos; l := length(ALine); - if ACount > 0 then begin; + if ACount > 0 then begin while (Result < l) and (ACount > 0) do begin inc(Result); if (ALine[Result] in [#0..#127, #192..#255]) and diff --git a/components/synedit/test/testbase.pas b/components/synedit/test/testbase.pas index f9202db561..3c22932fa0 100644 --- a/components/synedit/test/testbase.pas +++ b/components/synedit/test/testbase.pas @@ -6,8 +6,9 @@ unit TestBase; interface uses - Classes, SysUtils, Forms, fpcunit, SynEdit, LCLType, LCLProc, math, - SynEditTypes, SynEditPointClasses, SynEditKeyCmds, LazSynTextArea, SynEditMarkup, Clipbrd; + Classes, SysUtils, math, fpcunit, + Forms, LCLType, LCLProc, Clipbrd, LazUTF8, + SynEdit, SynEditTypes, SynEditPointClasses, SynEditKeyCmds, LazSynTextArea, SynEditMarkup; type diff --git a/components/synedit/test/testhighlightpas.pas b/components/synedit/test/testhighlightpas.pas index d517e1bb0f..a9981cc3b2 100644 --- a/components/synedit/test/testhighlightpas.pas +++ b/components/synedit/test/testhighlightpas.pas @@ -174,8 +174,9 @@ begin AssertEquals(Format('%s (%d/%d) FoldLvlEnd', [AName, ALine, AColumn]), FoldLvlEnd, nd.FoldLvlEnd); AssertEquals(Format('%s (%d/%d) NestLvlStart', [AName, ALine, AColumn]), NestLvlStart, nd.NestLvlStart); AssertEquals(Format('%s (%d/%d) NestLvlEnd', [AName, ALine, AColumn]), NestLvlEnd, nd.NestLvlEnd); - AssertEquals(Format('%s (%d/%d) FoldType', [AName, ALine, AColumn]), PtrUInt(FoldType), PtrUInt(nd.FoldType)); - AssertEquals(Format('%s (%d/%d) FoldTypeCompatible', [AName, ALine, AColumn]), PtrUInt(FoldTypeCompatible), PtrUInt(nd.FoldTypeCompatible)); + AssertEquals(Format('%s (%d/%d) FoldType', [AName, ALine, AColumn]), PtrInt(FoldType), PtrInt(nd.FoldType)); + AssertEquals(Format('%s (%d/%d) FoldTypeCompatible', [AName, ALine, AColumn]), + PtrInt(FoldTypeCompatible), PtrInt(nd.FoldTypeCompatible)); AssertEquals(Format('%s (%d/%d) FoldGroup:', [AName, ALine, AColumn]), FoldGroup, nd.FoldGroup); end; AssertEquals(Format('%s (%d/%d) FoldAction', [AName, ALine, AColumn]),