From 0ab06d1208c264023e2aebb37ba83b761219ff87 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/apps') 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