diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-12-18 10:42:36 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-12-18 10:42:36 +0000 |
commit | 1ee6295909c893c55693232a12f10cd8625a7260 (patch) | |
tree | 362a318d0d61d8922d6076bcc440f762a94e4d54 /Src/Zle/zle_main.c | |
parent | ac33044bd2a99a0dd70784e98d89992737f44e98 (diff) | |
download | zsh-1ee6295909c893c55693232a12f10cd8625a7260.tar.gz zsh-1ee6295909c893c55693232a12f10cd8625a7260.tar.xz zsh-1ee6295909c893c55693232a12f10cd8625a7260.zip |
24279: allow terminal changes after zle -I to be acquired by main shell
Diffstat (limited to 'Src/Zle/zle_main.c')
-rw-r--r-- | Src/Zle/zle_main.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 2817f9249..e29b759e9 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -208,10 +208,21 @@ mod_export void zsetterm(void) { struct ttyinfo ti; - #if defined(FIONREAD) int val; +#endif + if (fetchttyinfo) { + /* + * User requested terminal to be returned to normal use, + * so remember the terminal settings if not frozen. + */ + if (!ttyfrozen) + gettyinfo(&shttyinfo); + fetchttyinfo = 0; + } + +#if defined(FIONREAD) ioctl(SHTTY, FIONREAD, (char *)&val); if (val) { /* @@ -1113,6 +1124,7 @@ zleread(char **lp, char **rp, int flags, int context) insmode = unset(OVERSTRIKE); eofsent = 0; resetneeded = 0; + fetchttyinfo = 0; raw_lp = lp; lpromptbuf = promptexpand(lp ? *lp : NULL, 1, NULL, NULL); pmpt_attr = txtchange; |