Skip to content

Commit ea7a26c

Browse files
committed
Fixes:
This corrects the newline handling when using the readline library. Submitted by: "Martin J. Laubach" <mjl@wwx.vip.at>
1 parent 3bfbe9a commit ea7a26c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/bin/psql/psql.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.45 1997/01/02 07:07:32 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.46 1997/01/05 23:46:17 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -401,7 +401,10 @@ gets_noreadline(char *prompt, FILE * source)
401401
char *
402402
gets_readline(char *prompt, FILE * source)
403403
{
404-
return (readline(prompt));
404+
char *s = readline(prompt);
405+
fputc('\r', stdout);
406+
fflush(stdout);
407+
return s;
405408
}
406409

407410
/*

0 commit comments

Comments
 (0)