Print only the message contained in the record when the message length is less than the buffer length.

This commit is contained in:
abhishek
2012-04-27 20:06:32 +05:30
parent cdf665e4f1
commit 4052eb8235

View File

@@ -123,6 +123,7 @@ public class JLineLogHandler extends Handler {
// This ensures nothing is ever displayed when redrawing the line
reader.setDefaultPrompt("");
reader.redrawLine();
reader.printString(toDisplay);
// Now restore the line formatting settings back to their original
reader.setDefaultPrompt(shellPromptAccessor.getShellPrompt());
@@ -130,8 +131,6 @@ public class JLineLogHandler extends Handler {
reader.getCursorBuffer().setBuffer(buffer);
reader.getCursorBuffer().cursor = cursor;
reader.printString(toDisplay);
Boolean prohibitingRedraw = redrawProhibit.get();
if (prohibitingRedraw == null) {
reader.redrawLine();