(svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for textboxes to only

allow certain patterns (like numbers only)
This commit is contained in:
truelight
2006-08-19 09:31:22 +00:00
parent ee0daa0a4f
commit 83d56d6d79
19 changed files with 95 additions and 57 deletions

View File

@@ -956,7 +956,7 @@ bool InsertTextBufferClipboard(Textbuf *tb)
data = GlobalLock(cbuf); // clipboard data
dataptr = data;
for (; IsValidAsciiChar(*dataptr) && (tb->length + length) < (tb->maxlength - 1) &&
for (; IsValidAsciiChar(*dataptr, CS_ALPHANUMERAL) && (tb->length + length) < (tb->maxlength - 1) &&
(tb->maxwidth == 0 || width + tb->width + GetCharacterWidth(FS_NORMAL, (byte)*dataptr) <= tb->maxwidth); dataptr++) {
width += GetCharacterWidth(FS_NORMAL, (byte)*dataptr);
length++;