3

I've just recently begun experimenting with urxvt as a terminal emulator rather than xterm. I'm a heavy tmux user, so having both work seamlessly together is a must.

I've noticed that when running tmux inside urxvt, there is some odd behavior when selecting text. I hold shift, use the mouse to select text, and the text is highlighted in yellow (as if tmux is still handling it) but then blinks and flashes to a black background -- almost as if urxvt and tmux are competing for control of the selection. Does that make sense?

I've test this with zero (except enabling the mouse in tmux) personal configuration options in both tmux and urxvt.

In xterm, when I would hold shift and select text I would notice that it would highlight in reverse colors (as opposed to tmux's yellow background). In urxvt, the selected text still seems to be controlled by tmux.

Any ideas on how to fix this weird behavior?

I'd even be interested in some tips or keywords on how to uncover the problem here. Any developers familiar with the codebase that understand why mouse-selection works fine in xterm, but not with urxvt term?

jhoepken
  • 1,842
  • 3
  • 17
  • 24
brian
  • 37
  • 7

1 Answers1

2

Thanks to nicm from this issue in the tmux's github repository, the problem you described was solved for me (for tmux 2.1 and urxvt 9.21):

You can disable tmux entering copy mode when dragging by unbinding the MouseDrag1Pane key binding.

In .tmux.conf, add:

unbind -n MouseDrag1Pane
Mat.R
  • 174
  • 1
  • 13
  • The question is not on-topic for Stack Overflow as defined in the [help]. Please don't answer such questions; instead, you should flag them for attention and they will be closed or migrated appropriately. – Toby Speight May 08 '18 at 12:55
  • How can I flag it? It looks like I do not have the option. Should I remove my answer or let it like this? – Mat.R May 08 '18 at 14:46
  • I've voted to close/migrate the question. No need to delete your (otherwise good) answer - just leave it be. I think you don't get to flag questions until your reputation is a little bit higher. – Toby Speight May 08 '18 at 14:51