]> granicus.if.org Git - python/commitdiff
Issue #5833: Fix extra space character in readline completion with the
authorAntoine Pitrou <solipsis@pitrou.net>
Mon, 19 Oct 2009 18:17:18 +0000 (18:17 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Mon, 19 Oct 2009 18:17:18 +0000 (18:17 +0000)
GNU readline library version 6.0.

Modules/readline.c

index 67f463180dd933c3bd64d6bb85bf0bce8fe3317f..cd79cc63ce42621baaf671d00af46ce7da929b5f 100644 (file)
@@ -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);