From 030247da74b7c930706985c0700b6f4b6b9eaeff Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Thu, 19 Sep 2013 11:46:10 +0000 Subject: [PATCH] HOME/END bug --- readline/src/pad/prac1/EditableBufferedReader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) { -- libgit2 0.22.2