Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix set_next_input with prompt_toolkit 1.0.10 #10231
Please don't merge this just yet.
@jonathanslenders I discovered after updating that we can no longer set text in the buffer with a
Thanks, I've pushed a fix that only uses pre_run_callables if the attribute is there, and otherwise just sets the document directly.
There are a few features in IPython that put some text at the next prompt; probably the most obvious is the
Closes gh-10229 Please don't merge this just yet. jonathanslenders I discovered after updating that we can no longer set text in the buffer with a `pre_run` function, because `pre_run_callables` reset the buffer immediately after that. I've worked around this by adding another callable to `pre_run_callables` which sets the text that I want, but I don't know if this is the right way to do it, or whether it works with previous releases of prompt_toolkit.