mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-24 17:00:32 +02:00
36994: declare local REPLY for use with "zle .read-command"; use .self-insert instead of .self-insert-unmeta
This commit is contained in:
parent
0920bc6881
commit
aba7c00698
2 changed files with 9 additions and 3 deletions
|
|
@ -1,3 +1,9 @@
|
||||||
|
2015-10-27 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 36994: Functions/Zle/bracketed-paste-magic: declare local REPLY
|
||||||
|
for use with "zle .read-command"; use .self-insert instead of
|
||||||
|
.self-insert-unmeta
|
||||||
|
|
||||||
2015-10-27 Peter Stephenson <p.stephenson@samsung.com>
|
2015-10-27 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
* 36982: Doc/Zsh/expn.yo, Src/pattern.c, Test/D02glob.ztst,
|
* 36982: Doc/Zsh/expn.yo, Src/pattern.c, Test/D02glob.ztst,
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ bracketed-paste-magic() {
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
# Capture the pasted text in $PASTED
|
# Capture the pasted text in $PASTED
|
||||||
local PASTED
|
local PASTED REPLY
|
||||||
zle .bracketed-paste PASTED
|
zle .bracketed-paste PASTED
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -170,14 +170,14 @@ bracketed-paste-magic() {
|
||||||
while [[ -n $PASTED ]] && zle .read-command; do
|
while [[ -n $PASTED ]] && zle .read-command; do
|
||||||
PASTED=${PASTED#$KEYS}
|
PASTED=${PASTED#$KEYS}
|
||||||
if [[ $KEYS = ${(~j:|:)${(b)bpm_inactive}} ]]; then
|
if [[ $KEYS = ${(~j:|:)${(b)bpm_inactive}} ]]; then
|
||||||
zle .self-insert-unmeta
|
zle .self-insert
|
||||||
else
|
else
|
||||||
case $REPLY in
|
case $REPLY in
|
||||||
(${~bpm_active}) function () {
|
(${~bpm_active}) function () {
|
||||||
emulate -L $bpm_emulate; set -$bpm_opts
|
emulate -L $bpm_emulate; set -$bpm_opts
|
||||||
zle $REPLY
|
zle $REPLY
|
||||||
};;
|
};;
|
||||||
(*) zle .self-insert-unmeta;;
|
(*) zle .self-insert;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue