gh-118878: Pyrepl: show completions menu below the current line (#118939)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
Daniel Hollas 2025-01-21 21:06:13 +00:00 committed by GitHub
parent 5a9afe2362
commit 29caec62ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 17 additions and 9 deletions

View file

@ -850,7 +850,7 @@ class TestPyReplCompleter(TestCase):
output = multiline_input(reader, namespace)
self.assertEqual(output, "python")
def test_updown_arrow_with_completion_menu(self):
def test_up_down_arrow_with_completion_menu(self):
"""Up arrow in the middle of unfinished tab completion when the menu is displayed
should work and trigger going back in history. Down arrow should subsequently
get us back to the incomplete command."""
@ -860,6 +860,7 @@ class TestPyReplCompleter(TestCase):
events = itertools.chain(
code_to_events(code),
[
Event(evt="key", data="down", raw=bytearray(b"\x1bOB")),
Event(evt="key", data="up", raw=bytearray(b"\x1bOA")),
Event(evt="key", data="down", raw=bytearray(b"\x1bOB")),
],