emulation limitations.
+
+
Roadmap
-------
![Several Windows Open Including A Terminal](/screenshots/screenshot1.png?raw=true "Several Windows Open Including A Terminal")
+![Yo Dawg...](/screenshots/yodawg.png?raw=true "Yo Dawg, I heard you
+ like text windowing systems, so I ran a text windowing system inside your
+ text windowing system so you can have a terminal in your terminal.")
String line = in.readLine();
if ((line != null) && (line.length() > 0)) {
StringTokenizer tokenizer = new StringTokenizer(line);
- windowHeight = Integer.parseInt(tokenizer.nextToken());
- windowWidth = Integer.parseInt(tokenizer.nextToken());
+ int rc = Integer.parseInt(tokenizer.nextToken());
+ if (rc > 0) {
+ windowHeight = rc;
+ }
+ rc = Integer.parseInt(tokenizer.nextToken());
+ if (rc > 0) {
+ windowWidth = rc;
+ }
}
while (true) {
BufferedReader err = new BufferedReader(
* DECSTBM - Set top and bottom margins.
*/
private void decstbm() {
- int top = getCsiParam(0, 1, 1, height) - 1;
- int bottom = getCsiParam(1, height, 1, height) - 1;
+ boolean decPrivateModeFlag = false;
- if (top > bottom) {
- top = bottom;
+ for (int i = 0; i < collectBuffer.length(); i++) {
+ if (collectBuffer.charAt(i) == '?') {
+ decPrivateModeFlag = true;
+ break;
+ }
}
- scrollRegionTop = top;
- scrollRegionBottom = bottom;
+ if (decPrivateModeFlag) {
+ // This could be restore DEC private mode values.
+ // Ignore it.
+ } else {
+ // DECSTBM
+ int top = getCsiParam(0, 1, 1, height) - 1;
+ int bottom = getCsiParam(1, height, 1, height) - 1;
- // Home cursor
- cursorPosition(0, 0);
+ if (top > bottom) {
+ top = bottom;
+ }
+ scrollRegionTop = top;
+ scrollRegionBottom = bottom;
+
+ // Home cursor
+ cursorPosition(0, 0);
+ }
}
/**