diff options
| author | Barton E. Schaefer <schaefer@zsh.org> | 2015-09-01 11:26:06 -0700 |
|---|---|---|
| committer | Barton E. Schaefer <schaefer@zsh.org> | 2015-09-01 11:26:06 -0700 |
| commit | 3747f6b6ab20ac9082909dd0cb3376e4e35f2c6c (patch) | |
| tree | eacc1309abf7dfe2df4109a074df5fe4e48ea937 | |
| parent | 36365: magic-space could delete the reset of the line. (diff) | |
| download | zsh-3747f6b6ab20ac9082909dd0cb3376e4e35f2c6c.tar zsh-3747f6b6ab20ac9082909dd0cb3376e4e35f2c6c.tar.gz zsh-3747f6b6ab20ac9082909dd0cb3376e4e35f2c6c.tar.bz2 zsh-3747f6b6ab20ac9082909dd0cb3376e4e35f2c6c.tar.lz zsh-3747f6b6ab20ac9082909dd0cb3376e4e35f2c6c.tar.xz zsh-3747f6b6ab20ac9082909dd0cb3376e4e35f2c6c.tar.zst zsh-3747f6b6ab20ac9082909dd0cb3376e4e35f2c6c.zip | |
36376: handle signals during read1char() so it is possible to interrupt correct/correctall prompts
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | Src/utils.c | 7 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2015-09-01 Barton E. Schaefer <schaefer@zsh.org> + + * 36376: Src/utils.c: handle signals during read1char() so it is + possible to interrupt correct/correctall prompts + 2015-09-01 Peter Stephenson <p.stephenson@samsung.com> * 36365: Src/Zle/zle_tricky.c: magic-space removed the reset of diff --git a/Src/utils.c b/Src/utils.c index 4c4dc55cd..90f7c3317 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -2538,11 +2538,16 @@ static int read1char(int echo) { char c; + int q = queue_signal_level(); + dont_queue_signals(); while (read(SHTTY, &c, 1) != 1) { - if (errno != EINTR || errflag || retflag || breaks || contflag) + if (errno != EINTR || errflag || retflag || breaks || contflag) { + restore_queue_signals(q); return -1; + } } + restore_queue_signals(q); if (echo) write_loop(SHTTY, &c, 1); return STOUC(c); |
