summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2016-02-04 06:23:05 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2016-02-04 06:23:05 (GMT)
commita7eae4016ed2f97b15000022ce0f39e0b271b37c (patch)
tree226060b9d79901c2977c84c1401583577ab33f77
parent2b818142d17cc287d3581c7d2fbe6bbaa37ccee2 (diff)
downloadcpython-a7eae4016ed2f97b15000022ce0f39e0b271b37c.zip
cpython-a7eae4016ed2f97b15000022ce0f39e0b271b37c.tar.gz
cpython-a7eae4016ed2f97b15000022ce0f39e0b271b37c.tar.bz2
Issue #25660: Fix TAB key behaviour in REPL.
-rw-r--r--Lib/rlcompleter.py4
-rw-r--r--Misc/NEWS3
2 files changed, 6 insertions, 1 deletions
diff --git a/Lib/rlcompleter.py b/Lib/rlcompleter.py
index 378f5aa..26f5920 100644
--- a/Lib/rlcompleter.py
+++ b/Lib/rlcompleter.py
@@ -75,7 +75,9 @@ class Completer:
if not text.strip():
if state == 0:
- return '\t'
+ readline.insert_text('\t')
+ readline.redisplay()
+ return ''
else:
return None
diff --git a/Misc/NEWS b/Misc/NEWS
index 3a71354..691c533 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -67,6 +67,9 @@ Core and Builtins
- Issue #26171: Fix possible integer overflow and heap corruption in
zipimporter.get_data().
+- Issue #25660: Fix TAB key behaviour in REPL with readline.
+
+
Library
-------