mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-27 06:29:41 +02:00
LCL: Better fix range check error in SetCaretPos in Memo (the result of SendMessageW is defined to be of type LRESULT: see MSDN)
git-svn-id: trunk@45724 -
This commit is contained in:
parent
1056fb11be
commit
cca4d2158e
@ -1340,7 +1340,7 @@ end;
|
||||
|
||||
class procedure TWin32WSCustomMemo.SetCaretPos(const ACustomEdit: TCustomEdit; const NewPos: TPoint);
|
||||
var
|
||||
CharIndex: Longint;
|
||||
CharIndex: LRESULT;
|
||||
begin
|
||||
{ EM_LINEINDEX returns the char index of a given line }
|
||||
CharIndex := Windows.SendMessageW(ACustomEdit.Handle, EM_LINEINDEX, NewPos.Y, 0) + NewPos.X;
|
||||
|
Loading…
Reference in New Issue
Block a user