gh-119034, REPL: Change page up/down keys to search in history (#123607)

Change <page up> and <page down> keys of the Python REPL to history
search forward/backward.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
Victor Stinner 2024-09-06 13:15:00 +02:00 committed by GitHub
parent d683f49a7b
commit 8311b11800
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 113 additions and 4 deletions

View file

@ -163,7 +163,8 @@ def run_multiline_interactive_console(
r.isearch_direction = ''
r.console.forgetinput()
r.pop_input_trans()
r.dirty = True
r.pos = len(r.get_unicode())
r.dirty = True
r.refresh()
r.in_bracketed_paste = False
console.write("\nKeyboardInterrupt\n")