diff options
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Modules/readline.c | 7 |
2 files changed, 7 insertions, 3 deletions
@@ -100,6 +100,9 @@ C-API Library ------- +- Issue #5833: Fix extra space character in readline completion with the + GNU readline library version 6.0. + - Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment - Issue #7086: Added TCP support to SysLogHandler, and tidied up some diff --git a/Modules/readline.c b/Modules/readline.c index 03c95e3..51844f7 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -800,6 +800,10 @@ on_completion(const char *text, int state) static char ** flex_complete(char *text, int start, int end) { +#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER + rl_completion_append_character ='\0'; + rl_completion_suppress_append = 0; +#endif Py_XDECREF(begidx); Py_XDECREF(endidx); begidx = PyLong_FromLong((long) start); @@ -842,9 +846,6 @@ setup_readline(void) rl_completer_word_break_characters = strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?"); /* All nonalphanums except '.' */ -#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER - rl_completion_append_character ='\0'; -#endif begidx = PyLong_FromLong(0L); endidx = PyLong_FromLong(0L); |