diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-02-09 10:50:43 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-02-09 10:50:43 +0000 |
commit | 0035b9a6a68cc232604963cf086aade2861353c3 (patch) | |
tree | b9afd06942125b0b9f1088c04e368b82886c870f | |
parent | 077eea17e702530ec2436ba2aaad52e544f2deed (diff) | |
download | fpGUI-0035b9a6a68cc232604963cf086aade2861353c3.tar.xz |
* Applied Vladimir's TfpgEdit changes to TfpgMemo as well. We should really refactor text input components to share some code.
-rw-r--r-- | src/gui/gui_memo.pas | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/gui_memo.pas b/src/gui/gui_memo.pas index bc1e888a..beebb5af 100644 --- a/src/gui/gui_memo.pas +++ b/src/gui/gui_memo.pas @@ -837,12 +837,9 @@ begin s := AText; // Printable characters only - // Note: This is not UTF-8 compliant! - if (Ord(AText[1]) > 31) and (Ord(AText[1]) < 127) then + // Note: This is now UTF-8 compliant! + if (Ord(AText[1]) > 31) and (Ord(AText[1]) < 127) or (Length(AText) > 1) then begin - // printeable - //FText := FText + s; - if (FMaxLength <= 0) or (UTF8Length(FLines.Text) < FMaxLength) then begin DeleteSelection; |