From 97949b7afde73c20b85ac9040fdead71e01f33b1 Mon Sep 17 00:00:00 2001
From: Ben Pfaff <blp@gnu.org>
Date: Mon, 18 Jan 2010 22:19:13 -0800
Subject: [PATCH] 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.
---
 src/ui/terminal/read-line.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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
-- 
2.30.2