mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 23:09:38 +02:00
SynEdit highlighter: fixed a null range issue from revision 19048 #10773be327
git-svn-id: trunk@19049 -
This commit is contained in:
parent
10773be327
commit
c840c93831
@ -1629,6 +1629,8 @@ begin
|
|||||||
CompilerMode:=pcmDelphi;
|
CompilerMode:=pcmDelphi;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
SetAttributesOnChange({$IFDEF FPC}@{$ENDIF}DefHighlightChange);
|
SetAttributesOnChange({$IFDEF FPC}@{$ENDIF}DefHighlightChange);
|
||||||
|
if hcCodeFolding in Capabilities then
|
||||||
|
RootCodeFoldBlock.BlockType := Pointer(PtrInt(cfbtNone));
|
||||||
|
|
||||||
InitIdent;
|
InitIdent;
|
||||||
MakeMethodTables;
|
MakeMethodTables;
|
||||||
@ -2347,7 +2349,7 @@ function TSynPasSyn.GetWordTriplet(LogicalCaret: TPoint; Lines: TSynEditStrings;
|
|||||||
Next;
|
Next;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
// Search previous lines
|
// Search next lines
|
||||||
BeginX2 := 0;
|
BeginX2 := 0;
|
||||||
inc(Result);
|
inc(Result);
|
||||||
if Result < c-1 then begin
|
if Result < c-1 then begin
|
||||||
@ -2700,8 +2702,8 @@ end;
|
|||||||
|
|
||||||
procedure TSynPasSynRange.Assign(Src: TSynCustomHighlighterRange);
|
procedure TSynPasSynRange.Assign(Src: TSynCustomHighlighterRange);
|
||||||
begin
|
begin
|
||||||
inherited Assign(Src);
|
|
||||||
if (Src<>nil) and (Src<>TSynCustomHighlighterRange(NullRange)) then begin
|
if (Src<>nil) and (Src<>TSynCustomHighlighterRange(NullRange)) then begin
|
||||||
|
inherited Assign(Src);
|
||||||
FMode:=TSynPasSynRange(Src).FMode;
|
FMode:=TSynPasSynRange(Src).FMode;
|
||||||
FBracketNestLevel:=TSynPasSynRange(Src).FBracketNestLevel;
|
FBracketNestLevel:=TSynPasSynRange(Src).FBracketNestLevel;
|
||||||
FMinimumCodeFoldBlockLevel := TSynPasSynRange(Src).FMinimumCodeFoldBlockLevel;
|
FMinimumCodeFoldBlockLevel := TSynPasSynRange(Src).FMinimumCodeFoldBlockLevel;
|
||||||
|
Loading…
Reference in New Issue
Block a user