From ac05343049e7a092c711a97d616abfd5e85ca58e Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sun, 24 Jul 2016 22:33:14 +0200 Subject: 38936: fix vi-pipe function for option compatibility --- ChangeLog | 2 ++ Functions/Zle/vi-pipe | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 086298775..4fb827c71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2016-07-24 Oliver Kiddle + * 38936: Functions/Zle/vi-pipe: fix for option compatibility + * 38929: Doc/Zsh/contrib.yo, Functions/Zle/select-word-match: new vim style text object using match-words-by-style mechanism diff --git a/Functions/Zle/vi-pipe b/Functions/Zle/vi-pipe index 2d2e29587..028f1e1ce 100644 --- a/Functions/Zle/vi-pipe +++ b/Functions/Zle/vi-pipe @@ -7,16 +7,21 @@ # autoload -Uz vi-pipe # bindkey -a '!' vi-pipe +setopt localoptions noksharrays + autoload -Uz read-from-minibuffer local _save_cut="$CUTBUFFER" REPLY -# Use the standard vi-delete to accept a vi motion. -zle .vi-delete || return +# force movement to default to line mode +zle -U V +# Use the standard vi-change to accept a vi motion. +zle .vi-change || return read-from-minibuffer "!" +zle .vi-cmd-mode local _save_cur=$CURSOR # cut buffer contains the deleted text and can be modified -CUTBUFFER="$(eval $REPLY <<<$CUTBUFFER)" +CUTBUFFER=$(eval "$REPLY" <<<"$CUTBUFFER") # put the modified text back in position. if [[ CURSOR -eq 0 || $BUFFER[CURSOR] = $'\n' ]]; then -- cgit v1.2.3