From 6427dc48572b90d41d22b816e5f013df1368ffb8 Mon Sep 17 00:00:00 2001 From: Akarshit Wal Date: Sat, 7 Feb 2015 22:58:46 +0530 Subject: [PATCH] IllegalArgumentException not getting thrown when clicking in a second sketch window --- app/src/processing/app/syntax/JEditTextArea.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/processing/app/syntax/JEditTextArea.java b/app/src/processing/app/syntax/JEditTextArea.java index 7c6ed4b3a..bab0ea445 100644 --- a/app/src/processing/app/syntax/JEditTextArea.java +++ b/app/src/processing/app/syntax/JEditTextArea.java @@ -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 + "," +