I am using jline and I have a neat ConsoleReader and everything works great. However, if you are typing something into the the prompt and there is output on stdout (from another thread), the output splits the word/command that you are typing.
How can I keep the jline prompt at the bottom of the terminal?
I am using jline 1, but I am open to using jline 2 if it is stable enough.
Finally figured this out... here's what you do. First, define these functions:
Then when you want to output new data, first invoke
stashLine()to save the current console input, then output whatever new lines of output, then invokeunstashLine()to restore it.