SynEdit: Fix MultySyn Highlighter (uninitialized field)

git-svn-id: trunk@33512 -
This commit is contained in:
martin 2011-11-13 20:15:52 +00:00
parent 65bfe33229
commit 55b2d823fb

View File

@ -619,15 +619,18 @@ begin
do
FSectionList.Delete(FRegionScanRangeIndex);
VDiff := 0;
DebugLn(['***** ', FRegionScanStartRangeIndex, ' cnt ', Count]);
if FRegionScanStartRangeIndex < Count then begin
// fix virtual lines on sections
if (FRegionScanStartRangeIndex > 0) then begin
s := FSectionList.Sections[FRegionScanStartRangeIndex-1];
NewVLine := s.VirtualLine + s.EndPos.y - s.StartPos.y;
DebugLn(['A ', NewVLine]);
LastEnd := s.EndPos.y;
end
else begin
NewVLine := 0;
DebugLn(['B ', NewVLine]);
LastEnd := FSectionList.Sections[FRegionScanStartRangeIndex].StartPos.y;
end;
LastVline := NewVLine;
@ -679,6 +682,7 @@ begin
Sect.EndPos := AnEndPoint;
Sect.TokenStartPos := ATokenStartPos;
Sect.TokenEndPos := ATokenEndPos;
Sect.VirtualLine := 0;
FSectionList.Insert(FRegionScanRangeIndex, Sect);
end else begin
p := FSectionList.PSections[FRegionScanRangeIndex];