[Python-checkins] cpython (3.5): Issue #25660: Fix TAB key behaviour in REPL.

yury.selivanov python-checkins at python.org
Thu Feb 4 01:25:20 EST 2016


https://hg.python.org/cpython/rev/64417e7a1760
changeset:   100155:64417e7a1760
branch:      3.5
parent:      100152:78f32effc87a
user:        Yury Selivanov <yselivanov at sprymix.com>
date:        Thu Feb 04 01:23:05 2016 -0500
summary:
  Issue #25660: Fix TAB key behaviour in REPL.

files:
  Lib/rlcompleter.py |  4 +++-
  Misc/NEWS          |  3 +++
  2 files changed, 6 insertions(+), 1 deletions(-)


diff --git a/Lib/rlcompleter.py b/Lib/rlcompleter.py
--- a/Lib/rlcompleter.py
+++ b/Lib/rlcompleter.py
@@ -75,7 +75,9 @@
 
         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
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -67,6 +67,9 @@
 - Issue #26171: Fix possible integer overflow and heap corruption in
   zipimporter.get_data().
 
+- Issue #25660: Fix TAB key behaviour in REPL with readline.
+
+
 Library
 -------
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list