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

@ -438,7 +438,7 @@ class _ReadlineWrapper:
else:
line = self._histline(line)
if buffer:
line = "".join(buffer).replace("\r", "") + line
line = self._histline("".join(buffer).replace("\r", "") + line)
del buffer[:]
if line:
history.append(line)