diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2016-08-30 20:31:21 -0700 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2016-08-30 20:31:21 -0700 |
commit | 70166178bdc7ea149eb1cd29bcdb549a392c46dd (patch) | |
tree | 8a8d654ed69cd5b77258d99beb678693090e5711 | |
parent | c2592b4f7278cb9e3ce3cd663fb5effec570e7d4 (diff) | |
download | zsh-70166178bdc7ea149eb1cd29bcdb549a392c46dd.tar.gz zsh-70166178bdc7ea149eb1cd29bcdb549a392c46dd.tar.xz zsh-70166178bdc7ea149eb1cd29bcdb549a392c46dd.zip |
39131: return on error needs to be at the outer scope.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Functions/Misc/add-zle-hook-widget | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 866e2add1..2f8f5b7a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,11 @@ * 39122: Completion/Unix/Command/_git: __git_recent_branches: Silence warning on an edge case. +2016-08-30 Barton E. Schaefer <schaefer@zsh.org> + + * 39131: Functions/Misc/add-zle-hook-widget: return on error + needs to be at the outer scope. + 2016-08-30 Daniel Shahaf <d.s@daniel.shahaf.name> * 39108: Completion/Unix/Command/_postfix: Support diff --git a/Functions/Misc/add-zle-hook-widget b/Functions/Misc/add-zle-hook-widget index c47d9a3cb..572de2561 100644 --- a/Functions/Misc/add-zle-hook-widget +++ b/Functions/Misc/add-zle-hook-widget @@ -18,10 +18,6 @@ # # The -L option lists the hooks and their associated widgets. -() { # Preserve caller global option settings - -emulate -L zsh - # This is probably more safeguarding than necessary zmodload -e zsh/zle || return 1 { zmodload zsh/parameter && zmodload zsh/zleparameter } || { @@ -29,6 +25,10 @@ zmodload -e zsh/zle || return 1 return 1 } +() { # Preserve caller global option settings + +emulate -L zsh + # Setup - create the base functions for hook widgets that call the others local -a hooktypes=( zle-isearch-exit zle-isearch-update |