mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 21:19:07 +02:00
revert r28741 #34d7d7e235 because it breaks loading of saved fold info
git-svn-id: trunk@28742 -
This commit is contained in:
parent
34d7d7e235
commit
bf754531b7
@ -116,6 +116,7 @@ type
|
|||||||
cfbtUnitSection,
|
cfbtUnitSection,
|
||||||
cfbtProgram,
|
cfbtProgram,
|
||||||
cfbtUnit,
|
cfbtUnit,
|
||||||
|
cfbtRecord,
|
||||||
cfbtTry,
|
cfbtTry,
|
||||||
cfbtExcept,
|
cfbtExcept,
|
||||||
cfbtRepeat,
|
cfbtRepeat,
|
||||||
@ -138,7 +139,7 @@ const
|
|||||||
cfbtAll: TPascalCodeFoldBlockTypes =
|
cfbtAll: TPascalCodeFoldBlockTypes =
|
||||||
[low(TPascalCodeFoldBlockType)..high(TPascalCodeFoldBlockType)];
|
[low(TPascalCodeFoldBlockType)..high(TPascalCodeFoldBlockType)];
|
||||||
PascalWordTrippletRanges: TPascalCodeFoldBlockTypes =
|
PascalWordTrippletRanges: TPascalCodeFoldBlockTypes =
|
||||||
[cfbtBeginEnd, cfbtTopBeginEnd, cfbtProcedure, cfbtClass, cfbtProgram,
|
[cfbtBeginEnd, cfbtTopBeginEnd, cfbtProcedure, cfbtClass, cfbtProgram, cfbtRecord,
|
||||||
cfbtTry, cfbtExcept, cfbtRepeat, cfbtAsm, cfbtCase
|
cfbtTry, cfbtExcept, cfbtRepeat, cfbtAsm, cfbtCase
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -970,7 +971,9 @@ begin
|
|||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
// there may be more than on block ending here
|
// there may be more than on block ending here
|
||||||
tfb := TopPascalCodeFoldBlockType;
|
tfb := TopPascalCodeFoldBlockType;
|
||||||
if tfb = cfbtUnit then begin
|
if tfb = cfbtRecord then begin
|
||||||
|
EndPascalCodeFoldBlock;
|
||||||
|
end else if tfb = cfbtUnit then begin
|
||||||
EndPascalCodeFoldBlock;
|
EndPascalCodeFoldBlock;
|
||||||
end else if tfb = cfbtExcept then begin
|
end else if tfb = cfbtExcept then begin
|
||||||
EndPascalCodeFoldBlock;
|
EndPascalCodeFoldBlock;
|
||||||
@ -1283,12 +1286,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if KeyComp('Record') then begin
|
else if KeyComp('Record') then begin
|
||||||
|
StartPascalCodeFoldBlock(cfbtRecord);
|
||||||
Result := tkKey;
|
Result := tkKey;
|
||||||
if (rsAfterEqualOrColon in fRange) and (PasCodeFoldRange.BracketNestLevel = 0)
|
|
||||||
then begin
|
|
||||||
fRange := fRange + [rsAtClass];
|
|
||||||
StartPascalCodeFoldBlock(cfbtClass);
|
|
||||||
end;
|
|
||||||
end
|
end
|
||||||
else if KeyComp('Array') then Result := tkKey
|
else if KeyComp('Array') then Result := tkKey
|
||||||
else if KeyComp('Try') then
|
else if KeyComp('Try') then
|
||||||
@ -3698,14 +3697,14 @@ begin
|
|||||||
cfbtVarType:
|
cfbtVarType:
|
||||||
if FDividerDrawConfig[pddlVarGlobal].MaxDrawDepth > 0 then
|
if FDividerDrawConfig[pddlVarGlobal].MaxDrawDepth > 0 then
|
||||||
exit(FDividerDrawConfig[pddlVarGlobal].TopSetting);
|
exit(FDividerDrawConfig[pddlVarGlobal].TopSetting);
|
||||||
cfbtClass:
|
cfbtClass, cfbtRecord:
|
||||||
begin
|
begin
|
||||||
if CheckFoldNestLevel(0, i + 1, [cfbtProcedure],
|
if CheckFoldNestLevel(0, i + 1, [cfbtProcedure],
|
||||||
cfbtAll - [cfbtVarType, cfbtLocalVarType], c)
|
cfbtAll - [cfbtVarType, cfbtLocalVarType], c)
|
||||||
then t := pddlStructGlobal
|
then t := pddlStructGlobal
|
||||||
else t := pddlStructLocal;
|
else t := pddlStructLocal;
|
||||||
if CheckFoldNestLevel(FDividerDrawConfig[t].MaxDrawDepth - 1,
|
if CheckFoldNestLevel(FDividerDrawConfig[t].MaxDrawDepth - 1,
|
||||||
i + 1, [cfbtClass],
|
i + 1, [cfbtClass, cfbtRecord],
|
||||||
cfbtAll - [cfbtVarType, cfbtLocalVarType], c) then begin
|
cfbtAll - [cfbtVarType, cfbtLocalVarType], c) then begin
|
||||||
if c = 0
|
if c = 0
|
||||||
then exit(FDividerDrawConfig[t].TopSetting)
|
then exit(FDividerDrawConfig[t].TopSetting)
|
||||||
@ -3775,7 +3774,7 @@ begin
|
|||||||
Result.Enabled := TPascalCodeFoldBlockType(Index) in
|
Result.Enabled := TPascalCodeFoldBlockType(Index) in
|
||||||
[cfbtBeginEnd, cfbtTopBeginEnd, cfbtNestedComment,
|
[cfbtBeginEnd, cfbtTopBeginEnd, cfbtNestedComment,
|
||||||
cfbtProcedure, cfbtUses, cfbtLocalVarType, cfbtClass,
|
cfbtProcedure, cfbtUses, cfbtLocalVarType, cfbtClass,
|
||||||
cfbtClassSection, cfbtRepeat, cfbtCase,
|
cfbtClassSection, cfbtRecord, cfbtRepeat, cfbtCase,
|
||||||
cfbtAsm, cfbtRegion];
|
cfbtAsm, cfbtRegion];
|
||||||
if TPascalCodeFoldBlockType(Index) in
|
if TPascalCodeFoldBlockType(Index) in
|
||||||
[cfbtRegion, cfbtNestedComment, cfbtAnsiComment, cfbtBorCommand, cfbtSlashComment]
|
[cfbtRegion, cfbtNestedComment, cfbtAnsiComment, cfbtBorCommand, cfbtSlashComment]
|
||||||
|
@ -418,7 +418,7 @@ type
|
|||||||
const
|
const
|
||||||
|
|
||||||
(* When adding new entries, ensure that resourcestrings are re-assigned in InitLocale *)
|
(* When adding new entries, ensure that resourcestrings are re-assigned in InitLocale *)
|
||||||
EditorOptionsFoldInfoPas: Array [0..21] of TEditorOptionsFoldInfo
|
EditorOptionsFoldInfoPas: Array [0..22] of TEditorOptionsFoldInfo
|
||||||
= (
|
= (
|
||||||
(Name: dlgFoldPasProcedure; Xml: 'Procedure';
|
(Name: dlgFoldPasProcedure; Xml: 'Procedure';
|
||||||
Index: ord(cfbtProcedure); Enabled: True),
|
Index: ord(cfbtProcedure); Enabled: True),
|
||||||
@ -454,6 +454,8 @@ const
|
|||||||
Index: ord(cfbtClass); Enabled: True),
|
Index: ord(cfbtClass); Enabled: True),
|
||||||
(Name: dlgFoldPasClassSection; Xml: 'ClassSection';
|
(Name: dlgFoldPasClassSection; Xml: 'ClassSection';
|
||||||
Index: ord(cfbtClassSection); Enabled: True),
|
Index: ord(cfbtClassSection); Enabled: True),
|
||||||
|
(Name: dlgFoldPasRecord; Xml: 'Record';
|
||||||
|
Index: ord(cfbtRecord); Enabled: True),
|
||||||
|
|
||||||
(Name: dlgFoldPasIfDef; Xml: 'IfDef';
|
(Name: dlgFoldPasIfDef; Xml: 'IfDef';
|
||||||
Index: ord(cfbtIfDef); Enabled: False),
|
Index: ord(cfbtIfDef); Enabled: False),
|
||||||
@ -1505,12 +1507,13 @@ begin
|
|||||||
EditorOptionsFoldInfoPas[13].Name := dlgFoldPasVarType;
|
EditorOptionsFoldInfoPas[13].Name := dlgFoldPasVarType;
|
||||||
EditorOptionsFoldInfoPas[14].Name := dlgFoldPasClass;
|
EditorOptionsFoldInfoPas[14].Name := dlgFoldPasClass;
|
||||||
EditorOptionsFoldInfoPas[15].Name := dlgFoldPasClassSection;
|
EditorOptionsFoldInfoPas[15].Name := dlgFoldPasClassSection;
|
||||||
EditorOptionsFoldInfoPas[16].Name := dlgFoldPasIfDef;
|
EditorOptionsFoldInfoPas[16].Name := dlgFoldPasRecord;
|
||||||
EditorOptionsFoldInfoPas[17].Name := dlgFoldPasUserRegion;
|
EditorOptionsFoldInfoPas[17].Name := dlgFoldPasIfDef;
|
||||||
EditorOptionsFoldInfoPas[18].Name := dlgFoldPasAnsiComment;
|
EditorOptionsFoldInfoPas[18].Name := dlgFoldPasUserRegion;
|
||||||
EditorOptionsFoldInfoPas[19].Name := dlgFoldPasBorComment;
|
EditorOptionsFoldInfoPas[19].Name := dlgFoldPasAnsiComment;
|
||||||
EditorOptionsFoldInfoPas[20].Name := dlgFoldPasSlashComment;
|
EditorOptionsFoldInfoPas[20].Name := dlgFoldPasBorComment;
|
||||||
EditorOptionsFoldInfoPas[21].Name := dlgFoldPasNestedComment;
|
EditorOptionsFoldInfoPas[21].Name := dlgFoldPasSlashComment;
|
||||||
|
EditorOptionsFoldInfoPas[22].Name := dlgFoldPasNestedComment;
|
||||||
|
|
||||||
EditorOptionsFoldInfoHTML[0].Name := dlgFoldHtmlNode;
|
EditorOptionsFoldInfoHTML[0].Name := dlgFoldHtmlNode;
|
||||||
EditorOptionsFoldInfoHTML[1].Name := dlgFoldHtmlComment;
|
EditorOptionsFoldInfoHTML[1].Name := dlgFoldHtmlComment;
|
||||||
|
@ -1540,11 +1540,12 @@ resourcestring
|
|||||||
dlgFoldPasUses = 'Uses';
|
dlgFoldPasUses = 'Uses';
|
||||||
dlgFoldPasVarType = 'Var/Type (global)';
|
dlgFoldPasVarType = 'Var/Type (global)';
|
||||||
dlgFoldLocalPasVarType = 'Var/Type (local)';
|
dlgFoldLocalPasVarType = 'Var/Type (local)';
|
||||||
dlgFoldPasClass = 'Class/Object/Record';
|
dlgFoldPasClass = 'Class/Object';
|
||||||
dlgFoldPasClassSection = 'public/private';
|
dlgFoldPasClassSection = 'public/private';
|
||||||
dlgFoldPasUnitSection = 'Unit section';
|
dlgFoldPasUnitSection = 'Unit section';
|
||||||
dlgFoldPasProgram = 'Program';
|
dlgFoldPasProgram = 'Program';
|
||||||
dlgFoldPasUnit = 'Unit';
|
dlgFoldPasUnit = 'Unit';
|
||||||
|
dlgFoldPasRecord = 'Record';
|
||||||
dlgFoldPasTry = 'Try';
|
dlgFoldPasTry = 'Try';
|
||||||
dlgFoldPasExcept = 'Except/Finally';
|
dlgFoldPasExcept = 'Except/Finally';
|
||||||
dlgFoldPasRepeat = 'Repeat';
|
dlgFoldPasRepeat = 'Repeat';
|
||||||
|
Loading…
Reference in New Issue
Block a user