This commit is contained in:
krakjoe 2013-11-30 00:25:05 +00:00
parent af3d792c78
commit b6de073b00
3 changed files with 24 additions and 28 deletions

View file

@ -72,11 +72,10 @@ public class JTerminalPane extends JTextPane {
SimpleAttributeSet.EMPTY, StyleConstants.Foreground, c);
setCharacterAttributes(aset, false);
replaceSelection(s);
setCaretPosition(
(getDocument().getLength() > 0) ? (getDocument().getLength() - 1) : 0);
setCaretPosition(getDocument().getLength());
}
public void appendANSI(String s) {
public synchronized void appendANSI(String s) {
int aPos = 0;
int aIndex;
int mIndex;