mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 12:19:21 +02:00
SynEdit: Added hcCodeFolding to highlighter capabilities
git-svn-id: trunk@40529 -
This commit is contained in:
parent
fe7799e167
commit
805036a7ba
@ -189,7 +189,8 @@ type
|
|||||||
|
|
||||||
TSynHighlighterCapability = (
|
TSynHighlighterCapability = (
|
||||||
hcUserSettings, // supports Enum/UseUserSettings
|
hcUserSettings, // supports Enum/UseUserSettings
|
||||||
hcRegistry // supports LoadFrom/SaveToRegistry
|
hcRegistry, // supports LoadFrom/SaveToRegistry
|
||||||
|
hcCodeFolding
|
||||||
);
|
);
|
||||||
|
|
||||||
TSynHighlighterCapabilities = set of TSynHighlighterCapability;
|
TSynHighlighterCapabilities = set of TSynHighlighterCapability;
|
||||||
|
@ -325,6 +325,7 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
class function GetCapabilities: TSynHighlighterCapabilities; override;
|
||||||
function GetRange: Pointer; override;
|
function GetRange: Pointer; override;
|
||||||
|
|
||||||
// Info about Folds
|
// Info about Folds
|
||||||
@ -757,7 +758,12 @@ begin
|
|||||||
FFoldConfig := nil;
|
FFoldConfig := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSynCustomFoldHighlighter.GetRange: pointer;
|
class function TSynCustomFoldHighlighter.GetCapabilities: TSynHighlighterCapabilities;
|
||||||
|
begin
|
||||||
|
Result := inherited GetCapabilities + [hcCodeFolding];
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TSynCustomFoldHighlighter.GetRange: Pointer;
|
||||||
begin
|
begin
|
||||||
// FCodeFoldRange is the working range and changed steadily
|
// FCodeFoldRange is the working range and changed steadily
|
||||||
// => return a fixed copy of the current CodeFoldRange instance,
|
// => return a fixed copy of the current CodeFoldRange instance,
|
||||||
|
Loading…
Reference in New Issue
Block a user