Commit 2d72aa95ee49c431deb9d069e417a7d0bd74e65b
1 parent
dd75b5ee
git-svn-id: svn://imanolbarba.net/PAD@16 c2ee353e-ed0d-4329-bf56-03aec153487f
Showing
3 changed files
with
8 additions
and
7 deletions
readline/bin/pad/prac1/Console.class
No preview for this file type
readline/src/pad/prac1/Console.java
@@ -19,6 +19,7 @@ public class Console implements Observer | @@ -19,6 +19,7 @@ public class Console implements Observer | ||
19 | 19 | ||
20 | public void updateTermSize() | 20 | public void updateTermSize() |
21 | { | 21 | { |
22 | + // If we could just handle SIGWINCH, this would not be necessary and it would run A LOT faster | ||
22 | System.out.print((char)EditableBufferedReader.ESC); | 23 | System.out.print((char)EditableBufferedReader.ESC); |
23 | System.out.print((char)EditableBufferedReader.ESC_SEQ); | 24 | System.out.print((char)EditableBufferedReader.ESC_SEQ); |
24 | System.out.print("18t"); | 25 | System.out.print("18t"); |
readline/src/pad/prac1/EditableBufferedReader.java
@@ -26,13 +26,13 @@ public class EditableBufferedReader extends BufferedReader | @@ -26,13 +26,13 @@ public class EditableBufferedReader extends BufferedReader | ||
26 | 26 | ||
27 | /* KEY DEFINITIONS | 27 | /* KEY DEFINITIONS |
28 | * | 28 | * |
29 | - * ESC (0x1B) starts an escape sequence | ||
30 | - * ESC+[+C (0x1B 0x5B 0x43) Cursor Forward | ||
31 | - * ESC+[+D (0x1B 0x5B 0x44) Cursor Backward | ||
32 | - * ESC+[+2+~ (0x1B 0x5B 0x32 0x7E) Insert | ||
33 | - * ESC+[+3+~ (0x1B 0x5B 0x33 0x7E) Delete forward | ||
34 | - * ESC+O+H (0x1B 0x4F 0x48) Home | ||
35 | - * ESC+O+F (0x1B 0x4F 0x46) End | 29 | + * ESC (0x1B) starts an escape sequence |
30 | + * ESC+[+C (0x1B 0x5B 0x43) Cursor Forward | ||
31 | + * ESC+[+D (0x1B 0x5B 0x44) Cursor Backward | ||
32 | + * ESC+[+2+~ (0x1B 0x5B 0x32 0x7E) Insert | ||
33 | + * ESC+[+3+~ (0x1B 0x5B 0x33 0x7E) Delete forward | ||
34 | + * ESC+O+H (0x1B 0x4F 0x48) Home | ||
35 | + * ESC+O+F (0x1B 0x4F 0x46) End | ||
36 | */ | 36 | */ |
37 | 37 | ||
38 | public static final int RETURN_KEY = 0x0D; | 38 | public static final int RETURN_KEY = 0x0D; |