From cf0e1c9dca0071716d1952a6b1a552724ea06470 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 5 Jan 2000 01:44:04 +0000 Subject: zsh-workers/9212 --- Src/Zle/zle_main.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'Src/Zle/zle_main.c') diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 11c106be5..722612421 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -46,6 +46,11 @@ mod_export int incompfunc; /**/ mod_export int hascompmod; +/* ZLRF_* flags passed to zleread() */ + +/**/ +int zlereadflags; + /* != 0 if we're done editing */ /**/ @@ -447,8 +452,6 @@ getkey(int keytmout) return ret; } -static int no_restore_tty; - /* Read a line. It is returned metafied. */ /**/ @@ -505,8 +508,8 @@ zleread(char *lp, char *rp, int flags) pmpt_attr = txtchange; rpromptbuf = promptexpand(rp, 1, NULL, NULL); rpmpt_attr = txtchange; - histallowed = (flags & ZLRF_HISTORY); PERMALLOC { + zlereadflags = flags; histline = curhist; #ifdef HAVE_SELECT FD_ZERO(&foofd); @@ -540,8 +543,6 @@ zleread(char *lp, char *rp, int flags) if (tmout) alarm(tmout); zleactive = 1; - if (flags & ZLRF_NOSETTY) - no_restore_tty = 1; resetneeded = 1; errflag = retflag = 0; lastcol = -1; @@ -592,7 +593,7 @@ zleread(char *lp, char *rp, int flags) trashzle(); free(lpromptbuf); free(rpromptbuf); - zleactive = no_restore_tty = 0; + zleactive = zlereadflags = 0; alarm(0); } LASTALLOC; freeundo(); @@ -974,7 +975,7 @@ trashzle(void) fprintf(shout, "%s", postedit); fflush(shout); resetneeded = 1; - if (!no_restore_tty) + if (!(zlereadflags & ZLRF_NOSETTY)) settyinfo(&shttyinfo); } if (errflag) -- cgit 1.4.1