[Python-checkins] r75531 - python/trunk/Modules/readline.c

antoine.pitrou python-checkins at python.org
Mon Oct 19 20:17:19 CEST 2009


Author: antoine.pitrou
Date: Mon Oct 19 20:17:18 2009
New Revision: 75531

Log:
Issue #5833: Fix extra space character in readline completion with the
GNU readline library version 6.0.



Modified:
   python/trunk/Modules/readline.c

Modified: python/trunk/Modules/readline.c
==============================================================================
--- python/trunk/Modules/readline.c	(original)
+++ python/trunk/Modules/readline.c	Mon Oct 19 20:17:18 2009
@@ -801,6 +801,10 @@
 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 @@
 	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);


More information about the Python-checkins mailing list