Fix incorrect treatment of RL_PROMPT_START_IGNORE/RL_PROMPT_END_IGNORE,
authorTom Lane <[email protected]>
Tue, 3 Jan 2006 23:32:34 +0000 (23:32 +0000)
committerTom Lane <[email protected]>
Tue, 3 Jan 2006 23:32:34 +0000 (23:32 +0000)
per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343616 via Martin Pitt.

src/bin/psql/prompt.c

index 76654d599c7680f7a9a93505bc68d378974cd360..66e74644b5331502f9c4f707e8ac30f8a6e44f0d 100644 (file)
@@ -296,8 +296,8 @@ get_prompt(promptStatus_t status)
                                         * characters in prompt strings must be marked as such, in
                                         * order to properly display the line during editing.
                                         */
-                                       buf[0] = '\001';
-                                       buf[1] = (*p == '[') ? RL_PROMPT_START_IGNORE : RL_PROMPT_END_IGNORE;
+                                       buf[0] = (*p == '[') ? RL_PROMPT_START_IGNORE : RL_PROMPT_END_IGNORE;
+                                       buf[1] = '\0';
 #endif   /* USE_READLINE */
                                        break;