Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 10 lines (10 sloc) 0.31 kb
1 2 3 4 5 6 7 8 9 10
pos = textArea.getCaretPosition();
atStart = 0 == pos;
atEnd = textArea.getBufferLength() == pos;
if (!atStart && !atEnd && textArea.getText(pos, 1).equals("}")) {
textArea.insertEnterAndIndent();
textArea.setCaretPosition(pos);
textArea.insertEnterAndIndent();
} else {
textArea.insertEnterAndIndent();
}
Something went wrong with that request. Please try again.