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 + "," +