Skip to content
Browse files

Crash fix when reindenting

  • Loading branch information...
1 parent fbfb7d0 commit eea5ddfb1783ffb3a79b9d028e7454090dd806b8 @calebegg committed Dec 31, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/org/proofpad/PPDocument.java
View
2 src/org/proofpad/PPDocument.java
@@ -144,7 +144,7 @@ public IndentToken(String name, int offset, int type, IndentToken parent) {
if (caret != null && Prefs.autoClose.get() && len == 1 && getText(offs, 2).equals("()")) {
len = 2;
}
- } else if (pb != null) {
+ } else if (pb != null && pb.getReadOnlyIndex() != -1) {
while (pb.getReadOnlyIndex() >= offs) {
pb.undoOneItem();
}

0 comments on commit eea5ddf

Please sign in to comment.
Something went wrong with that request. Please try again.