Fix set_next_input with prompt_toolkit 1.0.10#10231
Conversation
|
Hi @takluyver, |
|
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 |
|
We're getting a number of bug reports that I believe this would fix, if someone would like to review it. |
|
@meeseeksdev backport to 5.x |
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.
Backport PR #10231 on branch 5.x
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_runfunction, becausepre_run_callablesreset the buffer immediately after that. I've worked around this by adding another callable topre_run_callableswhich 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.