1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-04 08:30:54 +02:00

Mikael Magnusson, 24076; 24081: cancel argument processing after widget

calls with general arguments
This commit is contained in:
Peter Stephenson 2007-11-10 14:30:22 +00:00
parent 50c2a44e71
commit aa7e584ee8
5 changed files with 15 additions and 5 deletions

View file

@ -1,3 +1,11 @@
2007-11-10 Peter Stephenson <p.w.stephenson@ntlworld.com>
* Mikael Magnusson, 24076; 24081: Doc/Zsh/zle.yo,
Functions/Zle/backward-kill-word-match,
Functions/Zle/delete-whole-word-match,
Functions/Zle/kill-word-match: need to cancel option
processing with -- after widget calls with arguments.
2007-11-09 Wayne Davison <wayned@users.sourceforge.net>
* unposted: Completion/Unix/Command/_rsync: Added missing

View file

@ -554,7 +554,9 @@ appears as if the top-level widget called by the user were still
active. With the option tt(-w), tt(WIDGET) and related parameters are set
to reflect the widget being executed by the tt(zle) call.
Any further arguments will be passed to the widget. If it is a shell
Any further arguments will be passed to the widget; note that as
standard argument handling is performed, any general argument list
should be preceded by tt(-)tt(-). If it is a shell
function, these are passed down as positional parameters; for builtin
widgets it is up to the widget in question what it does with them.
Currently arguments are only handled by the incremental-search commands,

View file

@ -23,7 +23,7 @@ while (( count-- )); do
if [[ -n $done || $LASTWIDGET = *kill* ]]; then
CUTBUFFER="$word$CUTBUFFER"
else
zle copy-region-as-kill "$word"
zle copy-region-as-kill -- "$word"
fi
LBUFFER=$matched_words[1]
else

View file

@ -9,7 +9,7 @@
# saved for future yanking in the normal way.
emulate -L zsh
setopt extendedglob
setopt extendedglob xtrace
local curcontext=:zle:$WIDGET
local -a matched_words
@ -49,7 +49,7 @@ if [[ $WIDGET = *kill* ]]; then
if [[ $LASTWIDGET = *kill* ]]; then
CUTBUFFER="$CUTBUFFER$word"
else
zle copy-region-as-kill "$word"
zle copy-region-as-kill -- "$word"
fi
fi
BUFFER="${BUFFER[1,pos1]}${BUFFER[pos2,-1]}"

View file

@ -22,7 +22,7 @@ while (( count-- )); do
if [[ -n $done || $LASTWIDGET = *kill* ]]; then
CUTBUFFER="$CUTBUFFER$word"
else
zle copy-region-as-kill $word
zle copy-region-as-kill -- $word
fi
RBUFFER=${(j..)matched_words[6,7]}
else