Commit 9d73d5b147b5d39fb92ea8c05e379becda61b0a2
1 parent
030247da
git-svn-id: svn://imanolbarba.net/PAD@8 c2ee353e-ed0d-4329-bf56-03aec153487f
Showing
2 changed files
with
3 additions
and
3 deletions
readline/bin/pad/prac1/EditableBufferedReader.class
No preview for this file type
readline/src/pad/prac1/EditableBufferedReader.java
@@ -161,7 +161,7 @@ public class EditableBufferedReader extends BufferedReader | @@ -161,7 +161,7 @@ public class EditableBufferedReader extends BufferedReader | ||
161 | { | 161 | { |
162 | System.out.print((char)ESC); | 162 | System.out.print((char)ESC); |
163 | System.out.print((char)ESC_SEQ); | 163 | System.out.print((char)ESC_SEQ); |
164 | - System.out.print((char)(NUM_0+pos-line.getCursorPosition())); | 164 | + System.out.print(Integer.toString(pos-line.getCursorPosition())); |
165 | System.out.print((char)FORWARD); | 165 | System.out.print((char)FORWARD); |
166 | } | 166 | } |
167 | 167 | ||
@@ -169,7 +169,7 @@ public class EditableBufferedReader extends BufferedReader | @@ -169,7 +169,7 @@ public class EditableBufferedReader extends BufferedReader | ||
169 | { | 169 | { |
170 | System.out.print((char)ESC); | 170 | System.out.print((char)ESC); |
171 | System.out.print((char)ESC_SEQ); | 171 | System.out.print((char)ESC_SEQ); |
172 | - System.out.print((char)(NUM_0-pos+line.getCursorPosition())); | 172 | + System.out.print(Integer.toString(line.getCursorPosition()-pos)); |
173 | System.out.print((char)BACKWARD); | 173 | System.out.print((char)BACKWARD); |
174 | } | 174 | } |
175 | line.setCursorPosition(pos); | 175 | line.setCursorPosition(pos); |
@@ -197,7 +197,7 @@ public class EditableBufferedReader extends BufferedReader | @@ -197,7 +197,7 @@ public class EditableBufferedReader extends BufferedReader | ||
197 | try | 197 | try |
198 | { | 198 | { |
199 | int character = read(); | 199 | int character = read(); |
200 | - System.err.print(Integer.toHexString(character) + " \n"); | 200 | + //System.err.print(Integer.toHexString(character) + " \n"); |
201 | switch(parseKey(character)) | 201 | switch(parseKey(character)) |
202 | { | 202 | { |
203 | case ESCAPE_SEQUENCE: | 203 | case ESCAPE_SEQUENCE: |