mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-20 14:54:31 +01:00
Fix: Exception when decreasing indent.
Fix to prevent an exception when decreasing indents if the length of the last line of file is less than the indent width.
This commit is contained in:
parent
6a721ab52a
commit
5e17ae84a2
@ -1151,7 +1151,11 @@ public class JEditTextArea extends JComponent
|
||||
newBias = true;
|
||||
}
|
||||
|
||||
if(newStart < 0 || newEnd > getDocumentLength())
|
||||
if (newEnd > getDocumentLength()) {
|
||||
newEnd = getDocumentLength();
|
||||
}
|
||||
|
||||
if(newStart < 0)
|
||||
{
|
||||
throw new IllegalArgumentException("Bounds out of"
|
||||
+ " range: " + newStart + "," +
|
||||
|
Loading…
x
Reference in New Issue
Block a user