Skip to content

Commit

Permalink
Try to fix #270
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Jan 24, 2025
1 parent 87d1f9b commit 6aba966
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,17 @@ public void append(LogEvent event)
if (reader != null)
{
// Draw the prompt line again if a reader is available
reader.callWidget(LineReader.CLEAR);
terminal.writer().print(getLayout().toSerializable(event));
reader.callWidget(LineReader.REDRAW_LINE);
reader.callWidget(LineReader.REDISPLAY);
synchronized (reader) {
if (reader.isReading()) {
reader.callWidget(LineReader.CLEAR);
terminal.writer().println(getLayout().toSerializable(event));
reader.callWidget(LineReader.REDRAW_LINE);
reader.callWidget(LineReader.REDISPLAY);
} else {
// No need to redraw prompt
terminal.writer().println(getLayout().toSerializable(event));
}
}
}
else
{
Expand Down

0 comments on commit 6aba966

Please sign in to comment.