0

I am using tmux (version 2.3) and I have only one option in my .tmux.conf file:

set -g mouse on 

I then follow the following steps to reproduce:

1) open up tmux 2) split into two vertical panes 3) move the cursor to the left pane 4) select some amount of text from multiple lines in left pane 5) immediately after letting go of the left mouse button when making the selection, an EQUAL amount of text in size to the selection, of gibberish characters, is pasted into the right hand pane overwriting whatever was previously on display on the right.

If I then click and select in the right pane, then the right pane reverts back and shows what it previously was showing. And again, the same thing happens... selecting text in the right pane, now causes a equal size selection of gibberish to overwrite the left hand pane.

Is this a bug? I can reproduce this easily. Does anyone else experience this or have a workaround?

I have attached a picture showing this behavior (in this case in the picture, only 1 line of gibberish shows up after selecting on the left hand side).tmux bug gibberish on selection

3
  • what version of tmux are you using? Commented Mar 6, 2020 at 17:14
  • tmux version 2.3 (this is at work, so I don't have any great options to upgrade) Commented Mar 6, 2020 at 17:18
  • While there are tmux questions with a programming aspect, this isn't one of them. This would be more appropriate for superuser.com or unix.stackexchange.com. Commented Mar 6, 2020 at 17:30

1 Answer 1

1

This is because you are using a terminal that claims to be xterm - so you have TERM=xterm outside tmux - but does not support the OSC 52 clipboard escape sequence.

You can either turn off the set-clipboard option in tmux (set -g set-clipboard off) to prevent it trying to use this sequence, or change to use the right TERM for your terminal outside tmux.

Sign up to request clarification or add additional context in comments.

3 Comments

I have set TERM=xterm-256color and have disabled the clipboard (set -g set-clipboard off) and neither of these changes fixes the issue. Any other suggestions? What should I set TERM to?
Are you sure you have turned set-clipboard off - does tmux show -s set-clipboard show off? Did you restart tmux after changing .tmux.conf? How could I guess what TERM you should use without knowing what terminal you are using?
I must have been doing something wrong and not reloading my config, because now I can confirm that setting "set -g set-clipboard off" DOES fix the problem. Thank you!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.