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; function TSynEditFoldedView.OpenFoldCount(aStartIndex: Integer): Integer;
// Todo: move entirely to FoldProvider // Todo: move entirely to FoldProvider
//var var
// hl: TSynCustomFoldHighlighter; hl: TSynCustomFoldHighlighter;
begin begin
Result := FoldProvider.FoldOpenCount(aStartIndex); hl := TSynCustomFoldHighlighter(HighLighter);
//hl := TSynCustomFoldHighlighter(HighLighter); if not assigned(hl) then
//if not assigned(hl) then exit(-1);
// exit(-1); Result := hl.FoldNestCount(AStartIndex-1) + FoldProvider.FoldOpenCount(AStartIndex);
//Result := hl.FoldNestCount(AStartIndex-1) + FoldProvider.FoldOpenCount(AStartIndex);
end; end;
function TSynEditFoldedView.OpenFoldInfo(aStartIndex, ColIndex: Integer): TFoldViewNodeInfo; function TSynEditFoldedView.OpenFoldInfo(aStartIndex, ColIndex: Integer): TFoldViewNodeInfo;