From 04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 15 Apr 1999 18:20:19 +0000 Subject: zsh-3.1.5-pws-12 --- Src/input.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'Src/input.c') diff --git a/Src/input.c b/Src/input.c index 66a21000c..6e62ce2c7 100644 --- a/Src/input.c +++ b/Src/input.c @@ -249,8 +249,21 @@ inputline(void) free(pptbuf); } ingetcline = shingetline(); - } else - ingetcline = (char *)zleread(ingetcpmptl, ingetcpmptr, 1); + } else { + /* + * Since we may have to read multiple lines before getting + * a complete piece of input, we tell zle not to restore the + * original tty settings after reading each chunk. Instead, + * this is done when the history mechanism for the current input + * terminates, which is not until we have the whole input. + * This is supposed to minimise problems on systems that clobber + * typeahead when the terminal settings are altered. + * pws 1998/03/12 + */ + ingetcline = (char *)zleread(ingetcpmptl, ingetcpmptr, + ZLRF_HISTORY|ZLRF_NOSETTY); + histdone |= HISTFLAG_SETTY; + } if (!ingetcline) { return lexstop = 1; } -- cgit 1.4.1