SourceSynEdit: fix scrolling with top-info hint. Issue #0024505

git-svn-id: trunk@41717 -
This commit is contained in:
martin 2013-06-14 19:54:26 +00:00
parent 81bcce809a
commit 362f050d90

View File

@ -211,6 +211,7 @@ type
FOnIfdefNodeStateRequest: TSynMarkupIfdefStateRequest;
FMarkupIfDef: TSynEditMarkupIfDef;
FTopInfoDisplay: TSourceLazSynTopInfoView;
FTopInfoLastTopLine: Integer;
FSrcSynCaretChangedLock: boolean;
FExtraMarkupLine: TSynEditMarkupSpecialLine;
FExtraMarkupMgr: TSynEditMarkupManager;
@ -1393,6 +1394,9 @@ begin
end;
end;
if TopLine <> FTopInfoLastTopLine then
ListCnt := Min(ListCnt, Max(0, CaretY - TopLine));
t := TopLine + ListCnt - TSourceLazSynSurfaceManager(FPaintArea).TopLineCount;
if (CaretY >= TopLine) and (CaretY < t) then
t := CaretY;
@ -1426,6 +1430,7 @@ begin
finally
FSrcSynCaretChangedLock := False;
FTopInfoLastTopLine := TopLine;
end;
end;