Tmux stops responding to key bindings after xclip usage

tmux

I use Tmux version 1.9. To push tmux's clipboard to my X clipboard I have such a string in tmux.conf:

bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"

The problem is that after pressing C-b C-c content of tmux's buffer goes to the X clipboard, but also all the key bindings stop working.
I can't create a new window, pane, etc.

Has anyone faced such a problem?

UPD

After a about a minute tmux starts responding to C-b bindings.

Best Answer

Instead of:

bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"

I ended up using this code:

bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard'

With such a binding to copy something to the X clipboard:

  • Press CTRL + b + [
  • Hit the SPACE
  • Select the text using vi-mode key combinations
  • Instead of Enter I hit y and without any freezes text goes to the system clipboard.
Related Question