SynEdit: outline color / debug gutter: fix 1 based index

git-svn-id: trunk@57520 -
This commit is contained in:
martin 2018-03-17 13:36:05 +00:00
parent a993ca4fed
commit c47fffce1e

View File

@ -204,7 +204,7 @@ begin
for i := FirstLine to LastLine do
begin
iLine := FoldView.DisplayNumber[i];
if (iLine < 0) or (iLine >= c) then break;
if (iLine <= 0) or (iLine > c) then break;
// next line rect
rcLine.Top := rcLine.Bottom;
rcLine.Bottom := rcLine.Bottom + LineHeight;
@ -223,7 +223,7 @@ begin
end;
s := IntToStr(FOwner.fFoldColorInfosCount) + s;
if iLine < length(FOwner.fFirstCharacterPhysColCache) then
s := s + ', '+IntToStr(FOwner.fFirstCharacterPhysColCache[iLine]);
s := s + ', '+IntToStr(FOwner.fFirstCharacterPhysColCache[ToIdx(iLine)]);
TextDrawer.ExtTextOut(rcLine.Left, rcLine.Top, ETO_OPAQUE or ETO_CLIPPED, rcLine,
PChar(Pointer(S)),Length(S));