From 2d72aa95ee49c431deb9d069e417a7d0bd74e65b Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Mon, 11 Nov 2013 18:02:25 +0000 Subject: [PATCH] git-svn-id: svn://imanolbarba.net/PAD@16 c2ee353e-ed0d-4329-bf56-03aec153487f --- readline/bin/pad/prac1/Console.class | Bin 3482 -> 0 bytes readline/src/pad/prac1/Console.java | 1 + readline/src/pad/prac1/EditableBufferedReader.java | 14 +++++++------- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/readline/bin/pad/prac1/Console.class b/readline/bin/pad/prac1/Console.class index 558a08c..0fd5a29 100644 Binary files a/readline/bin/pad/prac1/Console.class and b/readline/bin/pad/prac1/Console.class differ diff --git a/readline/src/pad/prac1/Console.java b/readline/src/pad/prac1/Console.java index 0f91be3..0d8e8ed 100644 --- a/readline/src/pad/prac1/Console.java +++ b/readline/src/pad/prac1/Console.java @@ -19,6 +19,7 @@ public class Console implements Observer public void updateTermSize() { + // If we could just handle SIGWINCH, this would not be necessary and it would run A LOT faster System.out.print((char)EditableBufferedReader.ESC); System.out.print((char)EditableBufferedReader.ESC_SEQ); System.out.print("18t"); diff --git a/readline/src/pad/prac1/EditableBufferedReader.java b/readline/src/pad/prac1/EditableBufferedReader.java index 7f0e238..b4ded63 100644 --- a/readline/src/pad/prac1/EditableBufferedReader.java +++ b/readline/src/pad/prac1/EditableBufferedReader.java @@ -26,13 +26,13 @@ public class EditableBufferedReader extends BufferedReader /* KEY DEFINITIONS * - * ESC (0x1B) starts an escape sequence - * ESC+[+C (0x1B 0x5B 0x43) Cursor Forward - * ESC+[+D (0x1B 0x5B 0x44) Cursor Backward - * ESC+[+2+~ (0x1B 0x5B 0x32 0x7E) Insert - * ESC+[+3+~ (0x1B 0x5B 0x33 0x7E) Delete forward - * ESC+O+H (0x1B 0x4F 0x48) Home - * ESC+O+F (0x1B 0x4F 0x46) End + * ESC (0x1B) starts an escape sequence + * ESC+[+C (0x1B 0x5B 0x43) Cursor Forward + * ESC+[+D (0x1B 0x5B 0x44) Cursor Backward + * ESC+[+2+~ (0x1B 0x5B 0x32 0x7E) Insert + * ESC+[+3+~ (0x1B 0x5B 0x33 0x7E) Delete forward + * ESC+O+H (0x1B 0x4F 0x48) Home + * ESC+O+F (0x1B 0x4F 0x46) End */ public static final int RETURN_KEY = 0x0D; -- libgit2 0.22.2