synedit: less hints

This commit is contained in:
mattias 2024-03-05 15:37:54 +01:00
parent 4c0096a138
commit 1c135fc40e
6 changed files with 11 additions and 11 deletions

View File

@ -1145,7 +1145,7 @@ end;
function TSynEditStrings.GetPhysicalCharWidths(Line: PChar; LineLen,
Index: Integer): TPhysicalCharWidths;
begin
SetLength(Result, LineLen);
SetLength(Result{%H-}, LineLen);
if LineLen = 0 then
exit;
DoGetPhysicalCharWidths(Line, LineLen, Index, @Result[0]);
@ -1202,7 +1202,7 @@ begin
if not (p^ in [#10,#13]) then begin
inc(p);
end else begin
SetLength(s,p-StartPos);
SetLength(s{%H-},p-StartPos);
if s<>'' then
System.Move(StartPos^,s[1],length(s));
sl.Add(s);

View File

@ -1514,13 +1514,13 @@ begin
GrpLow := FFoldGroup;
GrpHigh := FFoldGroup;
end;
SetLength(OpenCnt, FGroupCount);
SetLength(OpenCnt{%H-}, FGroupCount);
for Grp := 0 to FGroupCount - 1 do
OpenCnt[Grp] := 0;
ListCnt := FFoldNodeInfoList.Count;
if ListCnt < 0 then
exit;
SetLength(OpenIdx, FGroupCount, ListCnt);
SetLength(OpenIdx{%H-}, FGroupCount, ListCnt);
for Grp := GrpLow to GrpHigh do begin
(* Filtering group in the loop instead of the list only works, if 0 is the only special group

View File

@ -591,7 +591,7 @@ begin
TabData.SetLineInfo(Index, 0, False);
end else begin
i := length(Line);
SetLength(CharWidths, i);
SetLength(CharWidths{%H-}, i);
DoGetPhysicalCharWidths(Pchar(Line), i, Index, @CharWidths[0]);
Result := 0;
for i := 0 to length(CharWidths)-1 do

View File

@ -3393,7 +3393,7 @@ begin
exit;
end;
SetLength(s, Run - p);
SetLength(s{%H-}, Run - p);
move(fLine[p], s[1], Run - p);
if FPasDocWordList.IndexOf(LowerCase(s)) >= 0 then begin
Result := fPasDocKeyWordAttri.IsEnabled;
@ -4358,7 +4358,7 @@ var
Len: LongInt;
begin
Len := Run - fTokenPos;
SetLength(Result,Len);
SetLength(Result{%H-},Len);
if Len>0 then
System.Move(fLine[fTokenPos],Result[1],Len);
end;

View File

@ -192,7 +192,7 @@ var
Len: LongInt;
begin
Len := fTokenEnd - fTokenPos;
SetLength(Result,Len);
SetLength(Result{%H-},Len);
System.Move(fLine[fTokenPos],Result[1],Len);
end;

View File

@ -5,11 +5,11 @@ unit SynTextMateSyn;
interface
uses
Classes, SysUtils, fgl, Math,
Classes, SysUtils, fgl,
jsonparser, jsonscanner, fpjson,
// LazUtils
LazFileUtils,
Laz2_XMLRead, PList2JSon, Laz2_DOM, LazStringUtils,
Laz2_XMLRead, Laz2_DOM, LazStringUtils,
// LazEdit
TextMateGrammar,
// SynEdit
@ -184,7 +184,7 @@ var
i: Integer;
begin
GetRange;
i := Integer(TSynHighlighterTextMateRangeList(CurrentRanges).Range[Index]);
i := {%H-}Integer(TSynHighlighterTextMateRangeList(CurrentRanges).Range[Index]);
if i <> FCurrentRange then
FTextMateGrammar.MainPatternList[i].DecRefCount;