in core/src/com/jediterm/terminal/emulator/ControlSequence.java [110:141]
public boolean pushBackReordered(final TerminalDataStream channel) throws IOException {
if (myUnhandledChars == null) return false;
final char[] bytes = new char[1024]; // can't be more than the whole buffer...
int i = 0;
for (final char b : myUnhandledChars) {
bytes[i++] = b;
}
bytes[i++] = (byte)Ascii.ESC;
bytes[i++] = (byte)'[';
if (myStartsWithExclamationMark) {
bytes[i++] = (byte)'!';
}
if (myStartsWithQuestionMark) {
bytes[i++] = (byte)'?';
}
if (myStartsWithMoreMark) {
bytes[i++] = (byte)'>';
}
for (int argi = 0; argi < myArgc; argi++) {
if (argi != 0) bytes[i++] = ';';
String s = Integer.toString(myArgv[argi]);
for (int j = 0; j < s.length(); j++) {
bytes[i++] = s.charAt(j);
}
}
bytes[i++] = myFinalChar;
channel.pushBackBuffer(bytes, i);
return true;
}