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 commitc808d2187a
. (cherry picked from commit282c7134e8
)
This commit is contained in:
parent
7338c54a25
commit
4ad3d23c6d
@ -208,16 +208,16 @@ _zsh_highlight_bind_widgets()
|
|||||||
|
|
||||||
# User defined widget: override and rebind old one with prefix "orig-".
|
# User defined widget: override and rebind old one with prefix "orig-".
|
||||||
user:*) eval "zle -N orig-$cur_widget ${widgets[$cur_widget]#*:}; \
|
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";;
|
zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
|
||||||
|
|
||||||
# Completion widget: override and rebind old one with prefix "orig-".
|
# Completion widget: override and rebind old one with prefix "orig-".
|
||||||
completion:*) eval "zle -C orig-$cur_widget ${${widgets[$cur_widget]#*:}/:/ }; \
|
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";;
|
zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
|
||||||
|
|
||||||
# Builtin widget: override and make it call the builtin ".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";;
|
zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
|
||||||
|
|
||||||
# Default: unhandled case.
|
# Default: unhandled case.
|
||||||
|
Loading…
Reference in New Issue
Block a user