SynEdit/Cocoa: UTF8CodepointCount() used instead of UTF8Length()

This commit is contained in:
rich2014 2024-08-29 21:27:32 +08:00
parent c8a1f93a6e
commit 9297084337

View File

@ -189,7 +189,7 @@ begin
if (lineText.length>0) and (logicalPoint.x<=lineText.length+1) then begin
if logicalPoint.x > lineText.length then
logicalPoint.x:= lineText.length;
params.col:= UTF8Length( pchar(lineText), logicalPoint.x ) - 1;
params.col:= UTF8CodepointCount( pchar(lineText), logicalPoint.x ) - 1;
end else begin
params.col:= -1;
end;