You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by no...@apache.org on 2010/08/26 11:36:24 UTC

svn commit: r989571 - /pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java

Author: noelgrandin
Date: Thu Aug 26 09:36:24 2010
New Revision: 989571

URL: http://svn.apache.org/viewvc?rev=989571&view=rev
Log:
PIVOT-612 TextInput validator problem when modifying selected text

Modified:
    pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java?rev=989571&r1=989570&r2=989571&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java Thu Aug 26 09:36:24 2010
@@ -290,7 +290,7 @@ public class TextInput extends Component
             throw new IllegalArgumentException();
         }
 
-        if (this.text.length() + text.length() > maximumLength) {
+        if (this.text.length() + text.length() - selectionLength > maximumLength) {
             throw new IllegalArgumentException("Insertion of text would exceed maximum length.");
         }