Synedit: Fixed missing invalidation, after folding "/fold" default region

git-svn-id: trunk@21180 -
This commit is contained in:
martin 2009-08-11 23:54:05 +00:00
parent 05b23d62ab
commit 389bc62b33
2 changed files with 7 additions and 2 deletions

View File

@ -714,6 +714,7 @@ type
property TopView: Integer read GetTopView write SetTopView; // TopLine converted into Visible(View) lines
{$ENDIF}
function PasteFromClipboardEx(ClipHelper: TSynClipboardStream): Boolean;
function FindNextUnfoldedLine(iLine: integer; Down: boolean): Integer;
public
procedure FindMatchingBracket; virtual;
{$IFDEF SYN_LAZARUS}
@ -723,7 +724,6 @@ type
): TPoint; virtual;
//code fold
procedure CodeFoldAction(iLine: integer); deprecated;
function FindNextUnfoldedLine(iLine: integer; Down: boolean): Integer;
procedure UnfoldAll;
procedure FoldAll(StartLevel : Integer = 0; IgnoreNested : Boolean = False);
procedure EraseBackground(DC: HDC); override;
@ -6223,6 +6223,7 @@ begin
ScanFromAfterLock;
FFoldedLinesView.UnfoldAll;
FFoldedLinesView.CollapseDefaultFolds;
TopLine := TopLine;
end;
end;

View File

@ -2965,13 +2965,17 @@ begin
nd := hl.FoldNodeInfo[i, j, [sfaOpen, sfaFold]];
if (sfaDefaultCollapsed in nd.FoldAction) and
(not IsFoldedAtTextIndex(i, j))
then
then begin
fFoldTree.InsertNewFold(i+2, j, LengthForFoldAtTextIndex(i, j));
if Assigned(fOnFoldChanged) then
fOnFoldChanged(i);
end;
inc(j);
end;
end;
inc(i);
end;
CalculateMaps;
end;
function TSynEditFoldedView.GetFoldDescription(AStartIndex, AStartCol, AEndIndex,