Skip to content
Snippets Groups Projects
Commit fd8d371a authored by Paul Frybarger's avatar Paul Frybarger Committed by Junegunn Choi
Browse files

[zsh] Fix multiline prompt issue with 'zle reset-prompt' (#1397)

Close #867 
Close #1256 
parent 0e06e298
No related branches found
No related tags found
No related merge requests found
...@@ -60,8 +60,7 @@ __fzf_generic_path_completion() { ...@@ -60,8 +60,7 @@ __fzf_generic_path_completion() {
if [ -n "$matches" ]; then if [ -n "$matches" ]; then
LBUFFER="$lbuf$matches$tail" LBUFFER="$lbuf$matches$tail"
fi fi
zle redisplay zle reset-prompt
typeset -f zle-line-init >/dev/null && zle zle-line-init
break break
fi fi
dir=$(dirname "$dir") dir=$(dirname "$dir")
...@@ -100,8 +99,7 @@ _fzf_complete() { ...@@ -100,8 +99,7 @@ _fzf_complete() {
if [ -n "$matches" ]; then if [ -n "$matches" ]; then
LBUFFER="$lbuf$matches" LBUFFER="$lbuf$matches"
fi fi
zle redisplay zle reset-prompt
typeset -f zle-line-init >/dev/null && zle zle-line-init
command rm -f "$fifo" command rm -f "$fifo"
} }
...@@ -165,8 +163,7 @@ fzf-completion() { ...@@ -165,8 +163,7 @@ fzf-completion() {
if [ -n "$matches" ]; then if [ -n "$matches" ]; then
LBUFFER="$LBUFFER$matches" LBUFFER="$LBUFFER$matches"
fi fi
zle redisplay zle reset-prompt
typeset -f zle-line-init >/dev/null && zle zle-line-init
# Trigger sequence given # Trigger sequence given
elif [ ${#tokens} -gt 1 -a "$tail" = "$trigger" ]; then elif [ ${#tokens} -gt 1 -a "$tail" = "$trigger" ]; then
d_cmds=(${=FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir}) d_cmds=(${=FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir})
......
...@@ -29,8 +29,7 @@ __fzfcmd() { ...@@ -29,8 +29,7 @@ __fzfcmd() {
fzf-file-widget() { fzf-file-widget() {
LBUFFER="${LBUFFER}$(__fsel)" LBUFFER="${LBUFFER}$(__fsel)"
local ret=$? local ret=$?
zle redisplay zle reset-prompt
typeset -f zle-line-init >/dev/null && zle zle-line-init
return $ret return $ret
} }
zle -N fzf-file-widget zle -N fzf-file-widget
...@@ -59,7 +58,6 @@ fzf-cd-widget() { ...@@ -59,7 +58,6 @@ fzf-cd-widget() {
cd "$dir" cd "$dir"
local ret=$? local ret=$?
zle fzf-redraw-prompt zle fzf-redraw-prompt
typeset -f zle-line-init >/dev/null && zle zle-line-init
return $ret return $ret
} }
zle -N fzf-cd-widget zle -N fzf-cd-widget
...@@ -78,8 +76,7 @@ fzf-history-widget() { ...@@ -78,8 +76,7 @@ fzf-history-widget() {
zle vi-fetch-history -n $num zle vi-fetch-history -n $num
fi fi
fi fi
zle redisplay zle reset-prompt
typeset -f zle-line-init >/dev/null && zle zle-line-init
return $ret return $ret
} }
zle -N fzf-history-widget zle -N fzf-history-widget
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment