mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 23:27:26 +01:00
SynEdit: fix "Improve FindNextUnfoldedLine" (r63414) for hidden lines as very start of file.
git-svn-id: trunk@63431 -
This commit is contained in:
parent
edd19698a4
commit
e51e371c7c
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user