fzf icon indicating copy to clipboard operation
fzf copied to clipboard

fzf-tmux: hitting enter after `ctrl+T`/`alt+C` hangs tmux

Open krshrimali opened this issue 2 years ago • 6 comments

  • [x] I have read through the manual page (man fzf)
  • [x] I have the latest version of fzf
  • [x] I have searched through the existing issues

Info

  • OS
    • [x] Linux
    • [ ] Mac OS X
    • [ ] Windows
    • [ ] Etc.
  • Shell
    • [ ] bash
    • [x] zsh
    • [ ] fish

Problem / Steps to reproduce

  1. Install fzf, set export FZF_TMUX=1 in your shell config.
  2. Open terminal, launch tmux.
  3. Press alt+C
  4. Select anything random, hit enter.
  5. No key-press works after it, it goes back to the terminal, but nothing works after that.

I'm aware that there are run-shell -b solutions, but this is separate (I assume).

Versions:

➜  ~ fzf-tmux --version
fzf-tmux (with fzf 0.32.1 (19f9bbc))
➜  ~ fzf --version
0.32.1 (19f9bbc)

krshrimali avatar Aug 25 '22 15:08 krshrimali

Found this issue to be related with a couple of changes in tmux I made to help fix: https://github.com/neovim/neovim/issues/18667. The changes were: https://github.com/tiagovla/tmux/commit/f4a851c9c1aca136ee85169ee9e52dc9e5576ac3

I understand that it might not be directly related to fzf, but if anyone has any knowledge, does anyone know of a fix for this? I'm happy to close it in a couple of days though, since it's not a fzf bug! Thank you!

krshrimali avatar Aug 25 '22 15:08 krshrimali

I found a similar issue today with Ctrl+R inside tmux with zsh. The easy workaround is to just not use the tmux integration, but I also can't find out why it's happening.

Javex avatar Feb 21 '24 10:02 Javex

I found a similar issue today with Ctrl+R inside tmux with zsh. The easy workaround is to just not use the tmux integration, but I also can't find out why it's happening.

If it's indeed the same thing as I witnessed, switching fzf-tmux to popup mode (-p command-line switch) helped.

wahjava avatar Feb 21 '24 15:02 wahjava

tmux 3.4?

See https://github.com/junegunn/fzf/issues/3635

junegunn avatar Feb 22 '24 00:02 junegunn

If you can't use the latest fzf-tmux with the patch for some reason, you can use popup mode instead as suggested above.

export FZF_TMUX_OPTS='-p 100%,40% -y P'

junegunn avatar Feb 22 '24 05:02 junegunn

Amazing yeah spot on that's exactly my issue and setting those options fixed it. I'll wait for the next release and then upgrade. Thank you!

Javex avatar Feb 23 '24 10:02 Javex