[Pkg-zsh-commits] [zsh-syntax-highlighting] 01/08: Revert "wrapping: Don't add '--' when invoking widgets."

Daniel Shahaf danielsh-guest at moszumanska.debian.org
Fri Jan 29 09:27:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

danielsh-guest pushed a commit to branch debian/0.4.x
in repository zsh-syntax-highlighting.

commit 4ad3d23c6d455f506c2bd889db069e702f394523
Author: Daniel Shahaf <d.s at daniel.shahaf.name>
Date:   Sun Jan 17 19:35:07 2016 +0000

    Revert "wrapping: Don't add '--' when invoking widgets."
    
    The '--' guard was correct; it was there to guard against arguments belonging
    to the syntax «zle widget [ -n num ] [ -Nw ] [ -K keymap ] args».
    
    For example, this affected using <backward-kill-word> over
        BUFFER="-w "
        CURSOR=3
    after
        autoload -Uz select-word-style
        select-word-style default
        zstyle ':zle:backward-kill-word' word-style shell
    .
    
    This reverts commit c808d2187a7331dff4d493a945482d718e63bc7a.
    
    (cherry picked from commit 282c7134e8acdf241397c207300a65ad9be12e16)
---
 zsh-syntax-highlighting.zsh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh
index 3e243d2..905672f 100644
--- a/zsh-syntax-highlighting.zsh
+++ b/zsh-syntax-highlighting.zsh
@@ -208,16 +208,16 @@ _zsh_highlight_bind_widgets()
 
       # User defined widget: override and rebind old one with prefix "orig-".
       user:*) eval "zle -N orig-$cur_widget ${widgets[$cur_widget]#*:}; \
-                    _zsh_highlight_widget_$cur_widget() { _zsh_highlight_call_widget orig-$cur_widget \"\$@\" }; \
+                    _zsh_highlight_widget_$cur_widget() { _zsh_highlight_call_widget orig-$cur_widget -- \"\$@\" }; \
                     zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
 
       # Completion widget: override and rebind old one with prefix "orig-".
       completion:*) eval "zle -C orig-$cur_widget ${${widgets[$cur_widget]#*:}/:/ }; \
-                          _zsh_highlight_widget_$cur_widget() { _zsh_highlight_call_widget orig-$cur_widget \"\$@\" }; \
+                          _zsh_highlight_widget_$cur_widget() { _zsh_highlight_call_widget orig-$cur_widget -- \"\$@\" }; \
                           zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
 
       # Builtin widget: override and make it call the builtin ".widget".
-      builtin) eval "_zsh_highlight_widget_$cur_widget() { _zsh_highlight_call_widget .$cur_widget \"\$@\" }; \
+      builtin) eval "_zsh_highlight_widget_$cur_widget() { _zsh_highlight_call_widget .$cur_widget -- \"\$@\" }; \
                      zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
 
       # Default: unhandled case.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-zsh/zsh-syntax-highlighting.git



More information about the Pkg-zsh-commits mailing list