diff options
| author | Peter Stephenson <pws@zsh.org> | 2014-12-05 17:06:28 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@zsh.org> | 2014-12-05 17:06:28 +0000 |
| commit | b4a198cdda3d499af4e2b4f4a2279f98c8d07433 (patch) | |
| tree | 86e8cbecffba66db5683f222982f877d20fda385 /Completion | |
| parent | 33841: explain array append a bit better (diff) | |
| download | zsh-b4a198cdda3d499af4e2b4f4a2279f98c8d07433.tar zsh-b4a198cdda3d499af4e2b4f4a2279f98c8d07433.tar.gz zsh-b4a198cdda3d499af4e2b4f4a2279f98c8d07433.tar.bz2 zsh-b4a198cdda3d499af4e2b4f4a2279f98c8d07433.tar.lz zsh-b4a198cdda3d499af4e2b4f4a2279f98c8d07433.tar.xz zsh-b4a198cdda3d499af4e2b4f4a2279f98c8d07433.tar.zst zsh-b4a198cdda3d499af4e2b4f4a2279f98c8d07433.zip | |
33859: Fix traps in completion
We need to use a function-style trap in order for the effect of the
interrupt to propagate back correctly.
Diffstat (limited to 'Completion')
| -rw-r--r-- | Completion/Base/Core/_main_complete | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Completion/Base/Core/_main_complete b/Completion/Base/Core/_main_complete index fcd63664e..91b68fe5d 100644 --- a/Completion/Base/Core/_main_complete +++ b/Completion/Base/Core/_main_complete @@ -128,8 +128,11 @@ _completer_num=1 # We assume localtraps to be in effect here ... integer SECONDS=0 -trap 'zle -M "Killed by signal in ${funcstack[1]} after ${SECONDS}s"; - zle -R; return 130' INT QUIT +TRAPINT TRAPQUIT() { + zle -M "Killed by signal in ${funcstack[1]} after ${SECONDS}s"; + zle -R + return 130 +} # Call the pre-functions. |
