Skip to content

Commit

Permalink
Fix compatibility with zsh-autosuggesstions
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloxaf committed Mar 6, 2020
1 parent fc30c60 commit 1920579
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fzf-tab.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,12 @@ fzf-tab-complete() {
local orig_main_complete=${functions[_main_complete]}
function _main_complete() { typeset -g _fzf_tab_should_complete=1; }
{
zle $_fzf_tab_orig_widget
# It will cause twinkling if we call the widget with zsh-autosuggest's wrapper
if [[ $widgets[$_fzf_tab_orig_widget] == (#b)user:_zsh_autosuggest_bound_(*) ]]; then
zle autosuggest-orig-${match/_/-}
else
zle $_fzf_tab_orig_widget
fi
} always {
functions[_main_complete]=$orig_main_complete
}
Expand Down

0 comments on commit 1920579

Please sign in to comment.