diff --git a/readline/src/pad/prac1/EditableBufferedReader.java b/readline/src/pad/prac1/EditableBufferedReader.java index c77c194..0e7eff4 100644 --- a/readline/src/pad/prac1/EditableBufferedReader.java +++ b/readline/src/pad/prac1/EditableBufferedReader.java @@ -98,7 +98,7 @@ public class EditableBufferedReader extends BufferedReader if(line.getCursorPosition() != line.length()+1) { insertSpace(); - } + } System.out.print(c); line.insertCharAt(c, line.getCursorPosition()-1); line.setCursorPosition(line.getCursorPosition()+1); @@ -197,6 +197,7 @@ public class EditableBufferedReader extends BufferedReader try { int character = read(); + System.err.print(Integer.toHexString(character) + " \n"); switch(parseKey(character)) { case ESCAPE_SEQUENCE: @@ -266,7 +267,6 @@ public class EditableBufferedReader extends BufferedReader //ignore break; } - } catch (IOException e) {