summaryrefslogtreecommitdiffstats
path: root/generic/tkEntry.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-07-07 09:10:53 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-07-07 09:10:53 (GMT)
commit3147ddd47a51d3ff290bc0be54646e541624c7fa (patch)
treeae68a62323790530a12208e6e37b9a705fe55e90 /generic/tkEntry.c
parent2687e5c2fd2ae1b37cc53909951c6629bf87a74c (diff)
parent07515d78a3338310802f115886c4cfa80acc1795 (diff)
downloadtk-3147ddd47a51d3ff290bc0be54646e541624c7fa.zip
tk-3147ddd47a51d3ff290bc0be54646e541624c7fa.tar.gz
tk-3147ddd47a51d3ff290bc0be54646e541624c7fa.tar.bz2
Merge trunk
Diffstat (limited to 'generic/tkEntry.c')
-rw-r--r--generic/tkEntry.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 5bbad3e..2c5db3e 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -3385,17 +3385,21 @@ EntryValidateChange(
if (entryPtr->validateCmd == NULL ||
entryPtr->validate == VALIDATE_NONE) {
+ if (entryPtr->flags & VALIDATING) {
+ entryPtr->flags |= VALIDATE_ABORT;
+ }
return (varValidate ? TCL_ERROR : TCL_OK);
}
/*
- * If we're already validating, then we're hitting a loop condition Return
- * and set validate to 0 to disallow further validations and prevent
- * current validation from finishing
+ * If we're already validating, then we're hitting a loop condition. Set
+ * validate to none to disallow further validations, arrange for flags
+ * to prevent current validation from finishing, and return.
*/
if (entryPtr->flags & VALIDATING) {
entryPtr->validate = VALIDATE_NONE;
+ entryPtr->flags |= VALIDATE_ABORT;
return (varValidate ? TCL_ERROR : TCL_OK);
}