SynEdit: fix "Improve FindNextUnfoldedLine" (r63414) for hidden lines as very start of file.

git-svn-id: trunk@63431 -
This commit is contained in:
martin 2020-06-23 19:43:09 +00:00
parent edd19698a4
commit e51e371c7c

View File

@ -4247,7 +4247,7 @@ function TCustomSynEdit.FindNextUnfoldedLine(iLine: integer; Down: boolean
): Integer;
// iLine is 1 based
begin
Result := FTheLinesView.TextToViewIndex(ToIdx(iLine));
Result := Max(0, FTheLinesView.TextToViewIndex(ToIdx(iLine)));
if Down then
Result := ToPos(FTheLinesView.ViewToTextIndex(Result+1))
else