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

src/bin/psql/prompt.c

index d9610aca8857a3dc1f4b9371869d50871b8f8ecc..1b36c382708eab46af8e1886ac7948e7e5c3db94 100644 (file)
@@ -299,8 +299,8 @@ get_prompt(promptStatus_t status)
                                         * 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;