mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-01 08:36:09 +02:00
SynEdit, Fixed fold-context menu. Some items would not show, if begin-end blocks were not folded. issue #13576
git-svn-id: trunk@19602 -
This commit is contained in:
parent
4ff5a5562a
commit
468a0e145f
@ -2210,6 +2210,8 @@ begin
|
||||
n := o;
|
||||
for i := hl.FoldNodeInfoCount[aStartIndex] - 1 downto 0 do begin
|
||||
nd := hl.FoldNodeInfo[aStartIndex, i];
|
||||
if not(sfaFold in nd.FoldAction) then
|
||||
continue;
|
||||
t := nd.FoldGroup;
|
||||
if sfaOpen in nd.FoldAction then begin
|
||||
dec(n);
|
||||
|
@ -101,6 +101,7 @@ type
|
||||
TSynFoldAction = (sfaOpen, // At this node a new Fold can start
|
||||
sfaClose, // At this node a fold ends
|
||||
sfaMarkup, // This node can be highlighted, by the matching Word-Pair Markup
|
||||
sfaFold, // Part of a foldable block
|
||||
sfaInvalid // Wrong Index
|
||||
);
|
||||
TSynFoldActions = set of TSynFoldAction;
|
||||
|
@ -2767,8 +2767,9 @@ begin
|
||||
if FCatchNodeInfo then begin // exclude subblocks, because they do not increase the foldlevel yet
|
||||
GrowNodeInfoList;
|
||||
InitNode(FNodeInfoList[FNodeInfoCount], +1, ABlockType);
|
||||
// if not SubBlock then
|
||||
include(FNodeInfoList[FNodeInfoCount].FoldAction, sfaOpen);
|
||||
if FoldBlock then
|
||||
include(FNodeInfoList[FNodeInfoCount].FoldAction, sfaFold);
|
||||
include(FNodeInfoList[FNodeInfoCount].FoldAction, sfaOpen);
|
||||
inc(FNodeInfoCount);
|
||||
end;
|
||||
if not FoldBlock then
|
||||
@ -2783,8 +2784,9 @@ begin
|
||||
if FCatchNodeInfo then begin // exclude subblocks, because they do not increase the foldlevel yet
|
||||
GrowNodeInfoList;
|
||||
InitNode(FNodeInfoList[FNodeInfoCount], -1, TopPascalCodeFoldBlockType);
|
||||
// if DecreaseLevel then
|
||||
include(FNodeInfoList[FNodeInfoCount].FoldAction, sfaClose);
|
||||
if DecreaseLevel then
|
||||
include(FNodeInfoList[FNodeInfoCount].FoldAction, sfaFold);
|
||||
include(FNodeInfoList[FNodeInfoCount].FoldAction, sfaClose);
|
||||
inc(FNodeInfoCount);
|
||||
end;
|
||||
inherited EndCodeFoldBlock(DecreaseLevel);
|
||||
|
Loading…
Reference in New Issue
Block a user