-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mac Iterm2 Paste slowly causes Jline to throw ClosedException #757
Comments
There's something wrong in your analysis: the However, I've been able to reproduce the problem, so I'll have a look. |
So the problem is that the |
@tli-ocient could you verify that #782 actually works for you ? |
I have a simple command line interface which reads in a loop via JLine. I have found that launching this program in ITerm2 and then using the Iterm2 "Paste slowly" command causes a ClosedException to be thrown by Jline. I have also been able to reproduce this (though not as consistently) by CMD + V with a very long string into the command line interface.
Setup
Note in the above setup, my java program is running on a container with Ubuntu and I am SSHed in from my Macbook in Iterm2.
Details
My CLI program is very simple. It just calls the standard readLine function. in a loop until it finds a semicolon
;
. After that,it does things with the input.
How to reproduce
Alternative way to reproduce
What I see
I've also attached JDB and put a breakpoint at
org.jline.keymap.BindingReader:136
.I've printed out some relevant variables.
It appears that sequence it is looking for is an empty string. I can reproduce this quite easily if you need more information. I took a crack at fixing this here: #756
This passes all of your unit tests and fixes my problem. I don't know the context of this code very well so perhaps this is not the proper fix. It doesn't seem like it would ever find an empty string here and we should just return the whole string in this case.
Though, this is just my guess. Please let me know if you need more information.
The text was updated successfully, but these errors were encountered: