[zsh] Properly reset prompt after completion (#2318)

This commit is contained in:
Ruslan Sayfutdinov
2021-01-12 19:09:34 +00:00
committed by GitHub
parent cc5640326b
commit 9ddf5c72be

View File

@@ -211,7 +211,6 @@ _fzf_complete() {
if [ -n "$matches" ]; then if [ -n "$matches" ]; then
LBUFFER="$lbuf$matches" LBUFFER="$lbuf$matches"
fi fi
zle reset-prompt
command rm -f "$fifo" command rm -f "$fifo"
} }
@@ -302,6 +301,7 @@ fzf-completion() {
if eval "type _fzf_complete_${cmd} > /dev/null"; then if eval "type _fzf_complete_${cmd} > /dev/null"; then
prefix="$prefix" eval _fzf_complete_${cmd} ${(q)lbuf} prefix="$prefix" eval _fzf_complete_${cmd} ${(q)lbuf}
zle reset-prompt
elif [ ${d_cmds[(i)$cmd]} -le ${#d_cmds} ]; then elif [ ${d_cmds[(i)$cmd]} -le ${#d_cmds} ]; then
_fzf_dir_completion "$prefix" "$lbuf" _fzf_dir_completion "$prefix" "$lbuf"
else else