diff --git a/atsynedit/atsynedit_wrapinfo.pas b/atsynedit/atsynedit_wrapinfo.pas index 0aa8ee2dc..1298286bf 100644 --- a/atsynedit/atsynedit_wrapinfo.pas +++ b/atsynedit/atsynedit_wrapinfo.pas @@ -215,7 +215,6 @@ procedure TATWrapInfo.FindIndexesOfLineNumber(ALineNum: integer; out AFrom, ATo: function TATWrapInfo.FindIndexOfCaretPos(APos: TPoint): integer; var NFrom, NTo, i: integer; - Item: TATWrapItem; begin Result:= -1; FindIndexesOfLineNumber(APos.Y, NFrom, NTo); @@ -223,8 +222,7 @@ function TATWrapInfo.FindIndexOfCaretPos(APos: TPoint): integer; for i:= NFrom to NTo do begin Result:= i; - Item:= Data[i]; - if Item.NCharIndex+Item.NLength > APos.X+1 then // APos.X+1: see CudaText issue 2466 + if Data[i].NCharIndex + Data[i].NLength > APos.X+1 then // APos.X+1: see CudaText issue 2466 Break; end; end;