mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 11:59:20 +02:00
SynEdit: Pas HL, fix markup if "procedure" is outlined, but top level "begin" is not. Part 2 of Issue #0034410
git-svn-id: trunk@59298 -
This commit is contained in:
parent
6769e903a6
commit
22d26674f7
@ -91,6 +91,7 @@ type
|
|||||||
sfaOutlineKeepLevel, // Direct children should not increase color dept. (But grandchild can.) e.g. "if","then" any "procedure"
|
sfaOutlineKeepLevel, // Direct children should not increase color dept. (But grandchild can.) e.g. "if","then" any "procedure"
|
||||||
sfaOutlineMergeParent,// This node want to decrease current color depth. (But Previous sibling increased) e.g. "except", "finally"
|
sfaOutlineMergeParent,// This node want to decrease current color depth. (But Previous sibling increased) e.g. "except", "finally"
|
||||||
sfaOutlineForceIndent, // Node will temporary ignore sfaOutlineKeep. (Next sibling can.) e.g in NESTED "procedure"
|
sfaOutlineForceIndent, // Node will temporary ignore sfaOutlineKeep. (Next sibling can.) e.g in NESTED "procedure"
|
||||||
|
// TODO: review sfaOutlineNoColor / see issue 0034410
|
||||||
sfaOutlineNoColor, // Node will not painted by nested-coloring, but may increase color (e.g. any "procedure")
|
sfaOutlineNoColor, // Node will not painted by nested-coloring, but may increase color (e.g. any "procedure")
|
||||||
sfaOutlineNoLine, // Node doesn't want to have vertical line. (e.g. "then")
|
sfaOutlineNoLine, // Node doesn't want to have vertical line. (e.g. "then")
|
||||||
sfaInvalid, // Wrong Index
|
sfaInvalid, // Wrong Index
|
||||||
|
@ -3708,6 +3708,7 @@ var
|
|||||||
PasBlockType: TPascalCodeFoldBlockType;
|
PasBlockType: TPascalCodeFoldBlockType;
|
||||||
EndOffs: Integer;
|
EndOffs: Integer;
|
||||||
OneLine: Boolean;
|
OneLine: Boolean;
|
||||||
|
t: TSynCustomFoldConfig;
|
||||||
begin
|
begin
|
||||||
PasBlockType := TPascalCodeFoldBlockType(PtrUint(ABlockType));
|
PasBlockType := TPascalCodeFoldBlockType(PtrUint(ABlockType));
|
||||||
|
|
||||||
@ -3729,8 +3730,11 @@ begin
|
|||||||
if (PasBlockType in [cfbtClassSection]) then
|
if (PasBlockType in [cfbtClassSection]) then
|
||||||
Include( aActions, sfaOutlineMergeParent);
|
Include( aActions, sfaOutlineMergeParent);
|
||||||
|
|
||||||
if (PasBlockType in [cfbtProcedure]) then
|
if (PasBlockType in [cfbtProcedure]) then begin
|
||||||
aActions := aActions + [sfaOutlineKeepLevel,sfaOutlineNoColor];
|
t := FFoldConfig[ord(cfbtTopBeginEnd)];
|
||||||
|
if t.Enabled and (sfaOutline in t.FoldActions) then
|
||||||
|
aActions := aActions + [sfaOutlineKeepLevel,sfaOutlineNoColor];
|
||||||
|
end;
|
||||||
|
|
||||||
//if (PasBlockType in [cfbtProcedure]) and (InProcLevel > 0) then //nested
|
//if (PasBlockType in [cfbtProcedure]) and (InProcLevel > 0) then //nested
|
||||||
// aActions := aActions + [sfaOutlineForceIndent];
|
// aActions := aActions + [sfaOutlineForceIndent];
|
||||||
|
Loading…
Reference in New Issue
Block a user