EditorOptions/Mouse: Added more Fold Actions templates

(missed a file)

git-svn-id: trunk@20414 -
This commit is contained in:
martin 2009-06-04 23:59:43 +00:00
parent 0f7c792281
commit c48d05bde9

View File

@ -188,6 +188,25 @@ begin
FFoldView.FoldAtTextIndex(Line-1, -1, 1, True);
emcoCodeFoldCollapsAll:
FFoldView.FoldAtTextIndex(Line-1, -1, 0);
emcoCodeFoldCollapsAtCaret:
begin
i := FFoldView.LogicalPosToNodeIndex(Line-1, AnInfo.NewCaret.BytePos, False);
if i >= 0 then
FFoldView.FoldAtTextIndex(Line-1, i, 1, False)
else
Result := False;
end;
emcoCodeFoldCollapsPreCaret:
begin
i := FFoldView.LogicalPosToNodeIndex(Line-1, AnInfo.NewCaret.BytePos, True);
if i >= 0 then
FFoldView.FoldAtTextIndex(Line-1, i, 1, False)
else begin
i := FFoldView.ExpandedLineForBlockAtLine(Line);
if i > 0 then
FFoldView.FoldAtTextIndex(i-1, -1, 1, True);
end;
end;
end;
end;
emcCodeFoldExpand: