Merge pull request #3101 from Akarshit/bugfix-exceptionOnSecondWindow

IllegalArgumentException not getting thrown when clicking in a second sketch window
This commit is contained in:
Ben Fry
2015-02-21 11:16:17 -05:00

View File

@@ -1247,7 +1247,7 @@ public class JEditTextArea extends JComponent
newBias = true;
}
if(newStart < 0 || newEnd > getDocumentLength())
if((newStart < 0 || newEnd > getDocumentLength()) && start != end)
{
throw new IllegalArgumentException("Bounds out of"
+ " range: " + newStart + "," +