Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a7eae40

Browse files
committed
Issue #25660: Fix TAB key behaviour in REPL.
1 parent 2b81814 commit a7eae40

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Lib/rlcompleter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ def complete(self, text, state):
7575

7676
if not text.strip():
7777
if state == 0:
78-
return '\t'
78+
readline.insert_text('\t')
79+
readline.redisplay()
80+
return ''
7981
else:
8082
return None
8183

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ Core and Builtins
6767
- Issue #26171: Fix possible integer overflow and heap corruption in
6868
zipimporter.get_data().
6969

70+
- Issue #25660: Fix TAB key behaviour in REPL with readline.
71+
72+
7073
Library
7174
-------
7275

0 commit comments

Comments
 (0)