Skip to content

Commit

Permalink
optim
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Apr 3, 2020
1 parent 5e99ce5 commit c8930ce
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions atsynedit/atsynedit_wrapinfo.pas
Original file line number Diff line number Diff line change
Expand Up @@ -215,16 +215,14 @@ 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);
if NFrom<0 then Exit;
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;
Expand Down

0 comments on commit c8930ce

Please sign in to comment.