mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 22:40:56 +02:00
SynEdit Folding: Fixed detection of procedure blocks
git-svn-id: trunk@18177 -
This commit is contained in:
parent
bafca9d60e
commit
0a91971c12
@ -1239,7 +1239,7 @@ begin
|
||||
if not(rsAfterEqual in fRange) then begin
|
||||
TSynPasSynRange(CodeFoldRange).BracketNestLevel := 0; // Reset in case of partial code
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
if (rsImplementation in fRange) and
|
||||
if not (rsInterface in fRange) and
|
||||
not(TopPascalCodeFoldBlockType in [cfbtClass, cfbtClassSection])
|
||||
then
|
||||
StartPascalCodeFoldBlock(cfbtProcedure);
|
||||
@ -1260,7 +1260,7 @@ begin
|
||||
if not(rsAfterEqual in fRange) then begin
|
||||
TSynPasSynRange(CodeFoldRange).BracketNestLevel := 0; // Reset in case of partial code
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
if (rsImplementation in fRange) and
|
||||
if not (rsInterface in fRange) and
|
||||
not(TopPascalCodeFoldBlockType in [cfbtClass, cfbtClassSection])
|
||||
then
|
||||
StartPascalCodeFoldBlock(cfbtProcedure);
|
||||
@ -1380,7 +1380,7 @@ begin
|
||||
if not(rsAfterEqual in fRange) then begin
|
||||
TSynPasSynRange(CodeFoldRange).BracketNestLevel := 0; // Reset in case of partial code
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
if (rsImplementation in fRange) and
|
||||
if not (rsInterface in fRange) and
|
||||
not(TopPascalCodeFoldBlockType in [cfbtClass, cfbtClassSection])
|
||||
then
|
||||
StartPascalCodeFoldBlock(cfbtProcedure);
|
||||
@ -1396,7 +1396,7 @@ begin
|
||||
if not(rsAfterEqual in fRange) then begin
|
||||
TSynPasSynRange(CodeFoldRange).BracketNestLevel := 0; // Reset in case of partial code
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
if (rsImplementation in fRange) and
|
||||
if not (rsInterface in fRange) and
|
||||
not(TopPascalCodeFoldBlockType in [cfbtClass, cfbtClassSection])
|
||||
then
|
||||
StartPascalCodeFoldBlock(cfbtProcedure);
|
||||
@ -2131,7 +2131,7 @@ end;
|
||||
|
||||
procedure TSynPasSyn.ResetRange;
|
||||
begin
|
||||
fRange:= [];
|
||||
fRange:= [rsAfterSemicolon]; // Begin of file = new Statement
|
||||
FStartCodeFoldBlockLevel:=0;
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
Inherited ResetRange;
|
||||
|
Loading…
Reference in New Issue
Block a user