There was an error while loading. Please reload this page.
1 parent 90358c2 commit 4abf16aCopy full SHA for 4abf16a
app/src/processing/mode/java/PdeKeyListener.java
@@ -304,9 +304,11 @@ public boolean keyPressed(KeyEvent event) {
304
//textarea.setSelectionStart(origIndex + 1);
305
textarea.setSelectionEnd(textarea.getSelectionStop() - spaceCount);
306
textarea.setSelectedText("\n");
307
+ textarea.setCaretPosition(textarea.getCaretPosition() + extraCount + spaceCount);
308
} else {
309
String insertion = "\n" + spaces(spaceCount);
310
textarea.setSelectedText(insertion);
311
+ textarea.setCaretPosition(textarea.getCaretPosition() + extraCount);
312
}
313
314
// not gonna bother handling more than one brace
0 commit comments