From a7eae4016ed2f97b15000022ce0f39e0b271b37c Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Thu, 4 Feb 2016 01:23:05 -0500 Subject: [PATCH] Issue #25660: Fix TAB key behaviour in REPL. --- Lib/rlcompleter.py | 4 +++- Misc/NEWS | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Lib/rlcompleter.py b/Lib/rlcompleter.py index 378f5aa6473..26f59208bb4 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 3a71354a043..691c5337176 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 -------