-
Notifications
You must be signed in to change notification settings - Fork 714
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
Unable to enter a single-digit -ve argument #359
Comments
Actually, readline's behaves is a little more complex when used with Do we want to emulate this as is in prompt-toolkit? I have a patch working that doesn't take this difference into account. It can probably be extended, if the state of |
Actually, there is more to this, if we really want to emulate closely with readline. In readline, once you start entering an argument, you no longer have to keep |
Hi @haridsv, Thanks a lot for the extensive explanation, that was really helpful. I think in the last few commits, I fixed this and made it readline compatible. Can you please check whether everything works like you think it should? Thanks, |
Apologies for the delay in trying this out. I just pulled the latest and tried to use it with IPython. I immediately noticed that there is a big regression here. E.g., I can no longer type anything but a single digit as an argument. The moment I try to enter a second digit (with or without |
Yes, it is working as expected now. The only other difference I see compared to readline is when you have |
In readline, to enter a -ve argument, you start with
<Esc>
followed by-
, which immediately defaults to-1
as the argument ((arg: -1)
), but as soon as you enter a digit, say5
, the argument changes to-5
((arg: -5)
). The same sequence in prompt-toolkit results in an argument of-15
with no way to enter-5
as argument.The text was updated successfully, but these errors were encountered: