summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-10-19 18:17:18 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-10-19 18:17:18 (GMT)
commit119cdef9b4d2346be562cde54c41e4ba4e915190 (patch)
tree855eeed6480cd05ff5d422149007fbf0c50c3c60 /Modules
parent5ba84910ae25aff544272f223390482c63238c42 (diff)
downloadcpython-119cdef9b4d2346be562cde54c41e4ba4e915190.zip
cpython-119cdef9b4d2346be562cde54c41e4ba4e915190.tar.gz
cpython-119cdef9b4d2346be562cde54c41e4ba4e915190.tar.bz2
Issue #5833: Fix extra space character in readline completion with the
GNU readline library version 6.0.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/readline.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/readline.c b/Modules/readline.c
index 67f4631..cd79cc6 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -801,6 +801,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 = PyInt_FromLong((long) start);
@@ -843,9 +847,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 = PyInt_FromLong(0L);
endidx = PyInt_FromLong(0L);