@@ -682,7 +682,7 @@ public void drawLine() throws IOException {
682
682
rawPrint (prompt );
683
683
}
684
684
685
- print (buf .buffer , 0 , buf .cursor , promptLen );
685
+ fmtPrint (buf .buffer , 0 , buf .cursor , promptLen );
686
686
687
687
// force drawBuffer to check for weird wrap (after clear screen)
688
688
drawBuffer ();
@@ -894,7 +894,7 @@ protected String expandEvents(String str) throws IOException {
894
894
}
895
895
String result = sb .toString ();
896
896
if (!str .equals (result )) {
897
- print (result );
897
+ fmtPrint (result , getCursorPosition () );
898
898
println ();
899
899
flush ();
900
900
}
@@ -910,7 +910,7 @@ public void putString(final CharSequence str) throws IOException {
910
910
buf .write (str );
911
911
if (mask == null ) {
912
912
// no masking
913
- print (str , pos );
913
+ fmtPrint (str , pos );
914
914
} else if (mask == NULL_MASK ) {
915
915
// don't print anything
916
916
} else {
@@ -936,7 +936,7 @@ private void drawBuffer(final int clear) throws IOException {
936
936
nbChars = 0 ;
937
937
}
938
938
} else {
939
- print (buf .buffer , buf .cursor , buf .length ());
939
+ fmtPrint (buf .buffer , buf .cursor , buf .length ());
940
940
}
941
941
}
942
942
int cursorPos = promptLen + wcwidth (buf .buffer , 0 , buf .length (), promptLen );
@@ -3434,20 +3434,18 @@ else if (!next && !history.previous()) {
3434
3434
// Printing
3435
3435
//
3436
3436
3437
- public static final String CR = Configuration .getLineSeparator ();
3438
-
3439
3437
/**
3440
3438
* Output the specified characters to the output stream without manipulating the current buffer.
3441
3439
*/
3442
- private int print (final CharSequence buff , int cursorPos ) throws IOException {
3443
- return print (buff , 0 , buff .length (), cursorPos );
3440
+ private int fmtPrint (final CharSequence buff , int cursorPos ) throws IOException {
3441
+ return fmtPrint (buff , 0 , buff .length (), cursorPos );
3444
3442
}
3445
3443
3446
- private int print (final CharSequence buff , int start , int end ) throws IOException {
3447
- return print (buff , start , end , getCursorPosition ());
3444
+ private int fmtPrint (final CharSequence buff , int start , int end ) throws IOException {
3445
+ return fmtPrint (buff , start , end , getCursorPosition ());
3448
3446
}
3449
3447
3450
- private int print (final CharSequence buff , int start , int end , int cursorPos ) throws IOException {
3448
+ private int fmtPrint (final CharSequence buff , int start , int end , int cursorPos ) throws IOException {
3451
3449
checkNotNull (buff );
3452
3450
for (int i = start ; i < end ; i ++) {
3453
3451
char c = buff .charAt (i );
@@ -3477,7 +3475,7 @@ private int print(final CharSequence buff, int start, int end, int cursorPos) th
3477
3475
* Output the specified string to the output stream (but not the buffer).
3478
3476
*/
3479
3477
public void print (final CharSequence s ) throws IOException {
3480
- print ( s , getCursorPosition ());
3478
+ rawPrint ( s . toString ());
3481
3479
}
3482
3480
3483
3481
public void println (final CharSequence s ) throws IOException {
0 commit comments