From 76cbf5f55904d32cf4efc01c035e1db05c9fb7ad Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Fri, 15 Mar 2013 14:51:22 +0000 Subject: textedit: correctly set caret x position using UTF-8 Length() method --- examples/apps/ide/src/fpg_textedit.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/apps/ide/src/fpg_textedit.pas b/examples/apps/ide/src/fpg_textedit.pas index c6236cfc..7c8ef151 100644 --- a/examples/apps/ide/src/fpg_textedit.pas +++ b/examples/apps/ide/src/fpg_textedit.pas @@ -1074,7 +1074,7 @@ begin if VPos > (FLines.Count - FVisLines) then begin CaretPos.Y := FLines.Count-1; - CaretPos.X := Length(FLines[CaretPos.Y]); + CaretPos.X := UTF8Length(FLines[CaretPos.Y]); end else begin -- cgit v1.2.3-70-g09d2