Aloxaf / fzf-tab

Replace zsh's default completion selection menu with fzf!
MIT License
3.39k stars 96 forks source link

[BUG] fzf-bindings 'tab:accept' stops working after changing directories and going back #390

Closed Glitchzzy closed 9 months ago

Glitchzzy commented 1 year ago

Describe the bug

zstyle ':fzf-tab:*' fzf-bindings 'tab:accept' stops working after changing directories and going back

I can make sure:

To Reproduce

Steps to reproduce the behavior:

  1. Add zstyle ':fzf-tab:*' fzf-bindings 'tab:accept' to your ~/.zshrc file and source ~/.zshrc
  2. Change directories for two/three times using Tab to accept the selected option and then use cd or cd .. to go back one directory
  3. Instead of accepting the selected option, Tab will now cycle between then (as If the bind were not added)
  4. After using the clear command the bind starts works again

Expected behavior

Keep using tab as the binded key

Screenshots

https://github.com/Aloxaf/fzf-tab/assets/139287915/d61f6063-2a7c-44ba-affd-9acc907db8ff

Environment:

Minimal zshrc (My current settings for FZF-Tab)

[[ -z $TMUX ]] && exec tmux zstyle ':fzf-tab:' fzf-bindings 'tab:accept' zstyle ':fzf-tab:' fzf-command ftb-tmux-popup

Aloxaf commented 9 months ago

Just disable popup-smart-tab: zstyle ':fzf-tab:*' popup-smart-tab no

https://github.com/Aloxaf/fzf-tab/blob/b06e7574577cd729c629419a62029d31d0565a7a/lib/ftb-tmux-popup#L75-L77