When an input hook is set, Pyrepl doesn't correctly display the history until a new key press is made. <!-- gh-linked-prs --> ### Linked PRs * gh-121498 * gh-121703 <!-- /gh-linked-prs -->