diff options
-rw-r--r-- | prototypes/textedit/fpg_textedit.pas | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/prototypes/textedit/fpg_textedit.pas b/prototypes/textedit/fpg_textedit.pas index 1d1370a9..88cd9d17 100644 --- a/prototypes/textedit/fpg_textedit.pas +++ b/prototypes/textedit/fpg_textedit.pas @@ -1334,8 +1334,8 @@ begin SLine := FLines[CaretPos.Y]; { cursor was somewhere in whitespace, so we need to fill up the spaces } - if UTF8Length(SLine) < CaretPos.y + 1 then - for Fill := Length(SLine) to CaretPos.y + 1 do + if UTF8Length(SLine) < CaretPos.X + 1 then + for Fill := Length(SLine) to CaretPos.X + 1 do SLine := SLine + ' '; UTF8Insert(AText, SLine, CaretPos.X + 1); |