From: Ben Pfaff Date: Tue, 19 Jan 2010 06:19:13 +0000 (-0800) Subject: pspp: Fix interactive usability for multi-line commands. X-Git-Tag: fc11-i386-build78^0 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97949b7afde73c20b85ac9040fdead71e01f33b1;p=pspp-builds.git pspp: Fix interactive usability for multi-line commands. Until now, the terminal UI has only flushed output just before reading the first line of a command. This generally worked OK because typically only the final command produced output, not intermediate lines. But now every line of a command potentially produces output (e.g. the command name or the command syntax). With the ASCII driver that makes the interface difficult to use because it typically opens and holds open a pipe to an interactive program such as "more", which in turn turns off terminal echo etc. Flushing output before reading each command avoids this problem and makes the terminal UI more usable. --- diff --git a/src/ui/terminal/read-line.c b/src/ui/terminal/read-line.c index 86c75dea..54f90858 100644 --- a/src/ui/terminal/read-line.c +++ b/src/ui/terminal/read-line.c @@ -155,8 +155,7 @@ readln_read (struct string *line, enum prompt_style style) welcome (); - if (style == PROMPT_FIRST) - output_flush (); + output_flush (); #if HAVE_READLINE rl_attempted_completion_function = (style == PROMPT_FIRST