SynEdit: Codefolding for user-selected blocks (Not saved to session) fix fold-popup-menu

git-svn-id: trunk@30155 -
This commit is contained in:
martin 2011-04-03 14:48:33 +00:00
parent 71b29ef3e4
commit a7641e812a

View File

@ -3926,14 +3926,13 @@ end;
function TSynEditFoldedView.OpenFoldCount(aStartIndex: Integer): Integer;
// Todo: move entirely to FoldProvider
//var
// hl: TSynCustomFoldHighlighter;
var
hl: TSynCustomFoldHighlighter;
begin
Result := FoldProvider.FoldOpenCount(aStartIndex);
//hl := TSynCustomFoldHighlighter(HighLighter);
//if not assigned(hl) then
// exit(-1);
//Result := hl.FoldNestCount(AStartIndex-1) + FoldProvider.FoldOpenCount(AStartIndex);
hl := TSynCustomFoldHighlighter(HighLighter);
if not assigned(hl) then
exit(-1);
Result := hl.FoldNestCount(AStartIndex-1) + FoldProvider.FoldOpenCount(AStartIndex);
end;
function TSynEditFoldedView.OpenFoldInfo(aStartIndex, ColIndex: Integer): TFoldViewNodeInfo;