diff options
author | Peter Stephenson <pws@zsh.org> | 2014-12-08 13:19:42 +0000 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2014-12-08 13:19:42 +0000 |
commit | 0f05b5f05ad905711d180ef965dd6b245941bade (patch) | |
tree | 8fe98577371d318bd0cf1adcce55c2a6f164d95f | |
parent | 2908fcea0af871572556c128ce7b027837b3e546 (diff) | |
download | zsh-0f05b5f05ad905711d180ef965dd6b245941bade.tar.gz zsh-0f05b5f05ad905711d180ef965dd6b245941bade.tar.xz zsh-0f05b5f05ad905711d180ef965dd6b245941bade.zip |
33931: reset errflag before precmd()
-rw-r--r-- | Src/init.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Src/init.c b/Src/init.c index 3cbd4e522..305908724 100644 --- a/Src/init.c +++ b/Src/init.c @@ -118,6 +118,14 @@ loop(int toplevel, int justonce) if (interact && toplevel) { int hstop = stophist; stophist = 3; + /* + * Reset all errors including the interrupt error status + * immediately, so preprompt runs regardless of what + * just happened. We'll reset again below as a + * precaution to ensure we get back to the command line + * no matter what. + */ + errflag = 0; preprompt(); if (stophist != 3) hbegin(1); |